[PATCH 3/6] Make vsyscall_gtod_data compatible with 32 bit VDSO
From: Stefani Seibold To make the vsyscall_gtod_data available for both VDSO (X86_64 and IA32_EMULATION) the alignment must be set to 4. Otherwise the code create with "gcc -m32" will fail, since the structure alignment in 32 bit mode ist 4 byte. There is currently no drawback for X86_64, since the structure members are in a good order. Signed-off-by: Stefani Seibold --- arch/x86/include/asm/vgtod.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/vgtod.h b/arch/x86/include/asm/vgtod.h index eb87b53..86afff8 100644 --- a/arch/x86/include/asm/vgtod.h +++ b/arch/x86/include/asm/vgtod.h @@ -13,7 +13,7 @@ struct vsyscall_gtod_data { cycle_t mask; u32 mult; u32 shift; - } clock; + } __attribute__((aligned(4),packed)) clock; /* open coded 'struct timespec' */ time_t wall_time_sec; @@ -24,7 +24,8 @@ struct vsyscall_gtod_data { struct timezone sys_tz; struct timespec wall_time_coarse; struct timespec monotonic_time_coarse; -}; +} __attribute__((aligned(4),packed)); + extern struct vsyscall_gtod_data vsyscall_gtod_data; extern void map_vgtod(void); -- 1.8.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 3/6] Make vsyscall_gtod_data compatible with 32 bit VDSO
From: Stefani Seibold stef...@seibold.net To make the vsyscall_gtod_data available for both VDSO (X86_64 and IA32_EMULATION) the alignment must be set to 4. Otherwise the code create with gcc -m32 will fail, since the structure alignment in 32 bit mode ist 4 byte. There is currently no drawback for X86_64, since the structure members are in a good order. Signed-off-by: Stefani Seibold stef...@seibold.net --- arch/x86/include/asm/vgtod.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/vgtod.h b/arch/x86/include/asm/vgtod.h index eb87b53..86afff8 100644 --- a/arch/x86/include/asm/vgtod.h +++ b/arch/x86/include/asm/vgtod.h @@ -13,7 +13,7 @@ struct vsyscall_gtod_data { cycle_t mask; u32 mult; u32 shift; - } clock; + } __attribute__((aligned(4),packed)) clock; /* open coded 'struct timespec' */ time_t wall_time_sec; @@ -24,7 +24,8 @@ struct vsyscall_gtod_data { struct timezone sys_tz; struct timespec wall_time_coarse; struct timespec monotonic_time_coarse; -}; +} __attribute__((aligned(4),packed)); + extern struct vsyscall_gtod_data vsyscall_gtod_data; extern void map_vgtod(void); -- 1.8.0 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/