Messages in this thread Patch in this message | | | From | stefani@seibold ... | Subject | [PATCH 3/6] Make vsyscall_gtod_data compatible with 32 bit VDSO | Date | Tue, 18 Dec 2012 10:40:53 +0100 |
| |
From: Stefani Seibold <stefani@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 <stefani@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
| |