[PATCH v2 05/11] arm64: vdso: Remove union in declaration of the data store

Mark Brown broonie at kernel.org
Wed Jul 1 16:28:40 EDT 2020


Currently the vDSO data store is declared as part of a union with a page
of char for no documented reason, it *appears* that this has been done
for alignment purposes but we also have a __page_aligned_data annotation
so it's not 100% clear why and confusing when looking at the code.
Since it seems to be redundant with current toolchains remove the union.

Signed-off-by: Mark Brown <broonie at kernel.org>
---
 arch/arm64/kernel/vdso.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c
index bdc18fc80eb3..b05e4d5880af 100644
--- a/arch/arm64/kernel/vdso.c
+++ b/arch/arm64/kernel/vdso.c
@@ -69,14 +69,8 @@ static struct vdso_abi_info vdso_info[] __ro_after_init = {
 #endif /* CONFIG_COMPAT_VDSO */
 };
 
-/*
- * The vDSO data page.
- */
-static union {
-	struct arm64_vdso_data	data;
-	u8			page[PAGE_SIZE];
-} vdso_data_store __page_aligned_data;
-struct vdso_data *vdso_data = vdso_data_store.data.data;
+struct arm64_vdso_data vdso_data_store __page_aligned_data;
+struct vdso_data *vdso_data = vdso_data_store.data;
 
 static int __vdso_remap(enum vdso_abi abi,
 			const struct vm_special_mapping *sm,
-- 
2.20.1




More information about the linux-arm-kernel mailing list