aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/asm-offsets.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/asm-offsets.c')
-rw-r--r--arch/powerpc/kernel/asm-offsets.c45
1 files changed, 31 insertions, 14 deletions
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
index 8793102711a8..4550eb4f4fbd 100644
--- a/arch/powerpc/kernel/asm-offsets.c
+++ b/arch/powerpc/kernel/asm-offsets.c
@@ -37,12 +37,12 @@
37#include <asm/cputable.h> 37#include <asm/cputable.h>
38#include <asm/thread_info.h> 38#include <asm/thread_info.h>
39#include <asm/rtas.h> 39#include <asm/rtas.h>
40#include <asm/vdso_datapage.h>
40#ifdef CONFIG_PPC64 41#ifdef CONFIG_PPC64
41#include <asm/paca.h> 42#include <asm/paca.h>
42#include <asm/lppaca.h> 43#include <asm/lppaca.h>
43#include <asm/iseries/hv_lp_event.h> 44#include <asm/iseries/hv_lp_event.h>
44#include <asm/cache.h> 45#include <asm/cache.h>
45#include <asm/systemcfg.h>
46#include <asm/compat.h> 46#include <asm/compat.h>
47#endif 47#endif
48 48
@@ -251,25 +251,42 @@ int main(void)
251 251
252 DEFINE(TASK_SIZE, TASK_SIZE); 252 DEFINE(TASK_SIZE, TASK_SIZE);
253 DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28); 253 DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28);
254#else /* CONFIG_PPC64 */ 254#endif /* ! CONFIG_PPC64 */
255 /* systemcfg offsets for use by vdso */
256 DEFINE(CFG_TB_ORIG_STAMP, offsetof(struct systemcfg, tb_orig_stamp));
257 DEFINE(CFG_TB_TICKS_PER_SEC, offsetof(struct systemcfg, tb_ticks_per_sec));
258 DEFINE(CFG_TB_TO_XS, offsetof(struct systemcfg, tb_to_xs));
259 DEFINE(CFG_STAMP_XSEC, offsetof(struct systemcfg, stamp_xsec));
260 DEFINE(CFG_TB_UPDATE_COUNT, offsetof(struct systemcfg, tb_update_count));
261 DEFINE(CFG_TZ_MINUTEWEST, offsetof(struct systemcfg, tz_minuteswest));
262 DEFINE(CFG_TZ_DSTTIME, offsetof(struct systemcfg, tz_dsttime));
263 DEFINE(CFG_SYSCALL_MAP32, offsetof(struct systemcfg, syscall_map_32));
264 DEFINE(CFG_SYSCALL_MAP64, offsetof(struct systemcfg, syscall_map_64));
265 255
266 /* timeval/timezone offsets for use by vdso */ 256 /* datapage offsets for use by vdso */
257 DEFINE(CFG_TB_ORIG_STAMP, offsetof(struct vdso_data, tb_orig_stamp));
258 DEFINE(CFG_TB_TICKS_PER_SEC, offsetof(struct vdso_data, tb_ticks_per_sec));
259 DEFINE(CFG_TB_TO_XS, offsetof(struct vdso_data, tb_to_xs));
260 DEFINE(CFG_STAMP_XSEC, offsetof(struct vdso_data, stamp_xsec));
261 DEFINE(CFG_TB_UPDATE_COUNT, offsetof(struct vdso_data, tb_update_count));
262 DEFINE(CFG_TZ_MINUTEWEST, offsetof(struct vdso_data, tz_minuteswest));
263 DEFINE(CFG_TZ_DSTTIME, offsetof(struct vdso_data, tz_dsttime));
264 DEFINE(CFG_SYSCALL_MAP32, offsetof(struct vdso_data, syscall_map_32));
265 DEFINE(WTOM_CLOCK_SEC, offsetof(struct vdso_data, wtom_clock_sec));
266 DEFINE(WTOM_CLOCK_NSEC, offsetof(struct vdso_data, wtom_clock_nsec));
267#ifdef CONFIG_PPC64
268 DEFINE(CFG_SYSCALL_MAP64, offsetof(struct vdso_data, syscall_map_64));
267 DEFINE(TVAL64_TV_SEC, offsetof(struct timeval, tv_sec)); 269 DEFINE(TVAL64_TV_SEC, offsetof(struct timeval, tv_sec));
268 DEFINE(TVAL64_TV_USEC, offsetof(struct timeval, tv_usec)); 270 DEFINE(TVAL64_TV_USEC, offsetof(struct timeval, tv_usec));
269 DEFINE(TVAL32_TV_SEC, offsetof(struct compat_timeval, tv_sec)); 271 DEFINE(TVAL32_TV_SEC, offsetof(struct compat_timeval, tv_sec));
270 DEFINE(TVAL32_TV_USEC, offsetof(struct compat_timeval, tv_usec)); 272 DEFINE(TVAL32_TV_USEC, offsetof(struct compat_timeval, tv_usec));
273 DEFINE(TSPC32_TV_SEC, offsetof(struct compat_timespec, tv_sec));
274 DEFINE(TSPC32_TV_NSEC, offsetof(struct compat_timespec, tv_nsec));
275#else
276 DEFINE(TVAL32_TV_SEC, offsetof(struct timeval, tv_sec));
277 DEFINE(TVAL32_TV_USEC, offsetof(struct timeval, tv_usec));
278 DEFINE(TSPEC32_TV_SEC, offsetof(struct timespec, tv_sec));
279 DEFINE(TSPEC32_TV_NSEC, offsetof(struct timespec, tv_nsec));
280#endif
281 /* timeval/timezone offsets for use by vdso */
271 DEFINE(TZONE_TZ_MINWEST, offsetof(struct timezone, tz_minuteswest)); 282 DEFINE(TZONE_TZ_MINWEST, offsetof(struct timezone, tz_minuteswest));
272 DEFINE(TZONE_TZ_DSTTIME, offsetof(struct timezone, tz_dsttime)); 283 DEFINE(TZONE_TZ_DSTTIME, offsetof(struct timezone, tz_dsttime));
273#endif /* CONFIG_PPC64 */ 284
285 /* Other bits used by the vdso */
286 DEFINE(CLOCK_REALTIME, CLOCK_REALTIME);
287 DEFINE(CLOCK_MONOTONIC, CLOCK_MONOTONIC);
288 DEFINE(NSEC_PER_SEC, NSEC_PER_SEC);
289 DEFINE(CLOCK_REALTIME_RES, TICK_NSEC);
290
274 return 0; 291 return 0;
275} 292}