lkml.org 
[lkml]   [2012]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/6] Make vsyscall_gtod_data compatible with 32 bit VDSO
Date
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


\
 
 \ /
  Last update: 2012-12-18 12:42    [W:0.055 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site