aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc/kernel/asm-offsets.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ppc/kernel/asm-offsets.c')
-rw-r--r--arch/ppc/kernel/asm-offsets.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/ppc/kernel/asm-offsets.c b/arch/ppc/kernel/asm-offsets.c
index 968261d69572..fe0e767fb94e 100644
--- a/arch/ppc/kernel/asm-offsets.c
+++ b/arch/ppc/kernel/asm-offsets.c
@@ -25,6 +25,7 @@
25#include <asm/processor.h> 25#include <asm/processor.h>
26#include <asm/cputable.h> 26#include <asm/cputable.h>
27#include <asm/thread_info.h> 27#include <asm/thread_info.h>
28#include <asm/vdso_datapage.h>
28 29
29#define DEFINE(sym, val) \ 30#define DEFINE(sym, val) \
30 asm volatile("\n->" #sym " %0 " #val : : "i" (val)) 31 asm volatile("\n->" #sym " %0 " #val : : "i" (val))
@@ -143,5 +144,32 @@ main(void)
143 144
144 DEFINE(TASK_SIZE, TASK_SIZE); 145 DEFINE(TASK_SIZE, TASK_SIZE);
145 DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28); 146 DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28);
147
148 /* datapage offsets for use by vdso */
149 DEFINE(CFG_TB_ORIG_STAMP, offsetof(struct vdso_data, tb_orig_stamp));
150 DEFINE(CFG_TB_TICKS_PER_SEC, offsetof(struct vdso_data, tb_ticks_per_sec));
151 DEFINE(CFG_TB_TO_XS, offsetof(struct vdso_data, tb_to_xs));
152 DEFINE(CFG_STAMP_XSEC, offsetof(struct vdso_data, stamp_xsec));
153 DEFINE(CFG_TB_UPDATE_COUNT, offsetof(struct vdso_data, tb_update_count));
154 DEFINE(CFG_TZ_MINUTEWEST, offsetof(struct vdso_data, tz_minuteswest));
155 DEFINE(CFG_TZ_DSTTIME, offsetof(struct vdso_data, tz_dsttime));
156 DEFINE(CFG_SYSCALL_MAP32, offsetof(struct vdso_data, syscall_map_32));
157 DEFINE(WTOM_CLOCK_SEC, offsetof(struct vdso_data, wtom_clock_sec));
158 DEFINE(WTOM_CLOCK_NSEC, offsetof(struct vdso_data, wtom_clock_nsec));
159 DEFINE(TVAL32_TV_SEC, offsetof(struct timeval, tv_sec));
160 DEFINE(TVAL32_TV_USEC, offsetof(struct timeval, tv_usec));
161 DEFINE(TSPEC32_TV_SEC, offsetof(struct timespec, tv_sec));
162 DEFINE(TSPEC32_TV_NSEC, offsetof(struct timespec, tv_nsec));
163
164 /* timeval/timezone offsets for use by vdso */
165 DEFINE(TZONE_TZ_MINWEST, offsetof(struct timezone, tz_minuteswest));
166 DEFINE(TZONE_TZ_DSTTIME, offsetof(struct timezone, tz_dsttime));
167
168 /* Other bits used by the vdso */
169 DEFINE(CLOCK_REALTIME, CLOCK_REALTIME);
170 DEFINE(CLOCK_MONOTONIC, CLOCK_MONOTONIC);
171 DEFINE(NSEC_PER_SEC, NSEC_PER_SEC);
172 DEFINE(CLOCK_REALTIME_RES, TICK_NSEC);
173
146 return 0; 174 return 0;
147} 175}