fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / arch / ppc / kernel / asm-offsets.c
index 1999a42..e2e6c9a 100644 (file)
@@ -8,7 +8,6 @@
  * #defines from the assembly-language output.
  */
 
-#include <linux/config.h>
 #include <linux/signal.h>
 #include <linux/sched.h>
 #include <linux/kernel.h>
@@ -16,6 +15,7 @@
 #include <linux/string.h>
 #include <linux/types.h>
 #include <linux/ptrace.h>
+#include <linux/suspend.h>
 #include <linux/mman.h>
 #include <linux/mm.h>
 #include <asm/io.h>
@@ -24,6 +24,7 @@
 #include <asm/processor.h>
 #include <asm/cputable.h>
 #include <asm/thread_info.h>
+#include <asm/vdso_datapage.h>
 
 #define DEFINE(sym, val) \
        asm volatile("\n->" #sym " %0 " #val : : "i" (val))
@@ -36,7 +37,6 @@ main(void)
        DEFINE(THREAD, offsetof(struct task_struct, thread));
        DEFINE(THREAD_INFO, offsetof(struct task_struct, thread_info));
        DEFINE(MM, offsetof(struct task_struct, mm));
-       DEFINE(PTRACE, offsetof(struct task_struct, ptrace));
        DEFINE(KSP, offsetof(struct thread_struct, ksp));
        DEFINE(PGDIR, offsetof(struct thread_struct, pgdir));
        DEFINE(LAST_SYSCALL, offsetof(struct thread_struct, last_syscall));
@@ -46,7 +46,6 @@ main(void)
        DEFINE(THREAD_FPSCR, offsetof(struct thread_struct, fpscr));
 #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
        DEFINE(THREAD_DBCR0, offsetof(struct thread_struct, dbcr0));
-       DEFINE(PT_PTRACED, PT_PTRACED);
 #endif
 #ifdef CONFIG_ALTIVEC
        DEFINE(THREAD_VR0, offsetof(struct thread_struct, vr[0]));
@@ -120,6 +119,7 @@ main(void)
        DEFINE(TRAP, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, trap));
        DEFINE(CLONE_VM, CLONE_VM);
        DEFINE(CLONE_UNTRACED, CLONE_UNTRACED);
+       DEFINE(CLONE_KTHREAD, CLONE_KTHREAD);
        DEFINE(MM_PGD, offsetof(struct mm_struct, pgd));
 
        /* About the CPU features table */
@@ -129,6 +129,45 @@ main(void)
        DEFINE(CPU_SPEC_FEATURES, offsetof(struct cpu_spec, cpu_features));
        DEFINE(CPU_SPEC_SETUP, offsetof(struct cpu_spec, cpu_setup));
 
+       DEFINE(TI_TASK, offsetof(struct thread_info, task));
+       DEFINE(TI_EXECDOMAIN, offsetof(struct thread_info, exec_domain));
+       DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
+       DEFINE(TI_LOCAL_FLAGS, offsetof(struct thread_info, local_flags));
+       DEFINE(TI_CPU, offsetof(struct thread_info, cpu));
+       DEFINE(TI_PREEMPT, offsetof(struct thread_info, preempt_count));
+
+       DEFINE(pbe_address, offsetof(struct pbe, address));
+       DEFINE(pbe_orig_address, offsetof(struct pbe, orig_address));
+       DEFINE(pbe_next, offsetof(struct pbe, next));
+
+       DEFINE(TASK_SIZE, TASK_SIZE);
        DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28);
+
+       /* datapage offsets for use by vdso */
+       DEFINE(CFG_TB_ORIG_STAMP, offsetof(struct vdso_data, tb_orig_stamp));
+       DEFINE(CFG_TB_TICKS_PER_SEC, offsetof(struct vdso_data, tb_ticks_per_sec));
+       DEFINE(CFG_TB_TO_XS, offsetof(struct vdso_data, tb_to_xs));
+       DEFINE(CFG_STAMP_XSEC, offsetof(struct vdso_data, stamp_xsec));
+       DEFINE(CFG_TB_UPDATE_COUNT, offsetof(struct vdso_data, tb_update_count));
+       DEFINE(CFG_TZ_MINUTEWEST, offsetof(struct vdso_data, tz_minuteswest));
+       DEFINE(CFG_TZ_DSTTIME, offsetof(struct vdso_data, tz_dsttime));
+       DEFINE(CFG_SYSCALL_MAP32, offsetof(struct vdso_data, syscall_map_32));
+       DEFINE(WTOM_CLOCK_SEC, offsetof(struct vdso_data, wtom_clock_sec));
+       DEFINE(WTOM_CLOCK_NSEC, offsetof(struct vdso_data, wtom_clock_nsec));
+       DEFINE(TVAL32_TV_SEC, offsetof(struct timeval, tv_sec));
+       DEFINE(TVAL32_TV_USEC, offsetof(struct timeval, tv_usec));
+       DEFINE(TSPEC32_TV_SEC, offsetof(struct timespec, tv_sec));
+       DEFINE(TSPEC32_TV_NSEC, offsetof(struct timespec, tv_nsec));
+
+       /* timeval/timezone offsets for use by vdso */
+       DEFINE(TZONE_TZ_MINWEST, offsetof(struct timezone, tz_minuteswest));
+       DEFINE(TZONE_TZ_DSTTIME, offsetof(struct timezone, tz_dsttime));
+
+       /* Other bits used by the vdso */
+       DEFINE(CLOCK_REALTIME, CLOCK_REALTIME);
+       DEFINE(CLOCK_MONOTONIC, CLOCK_MONOTONIC);
+       DEFINE(NSEC_PER_SEC, NSEC_PER_SEC);
+       DEFINE(CLOCK_REALTIME_RES, TICK_NSEC);
+
        return 0;
 }