0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #include <linux/sched.h>
0015 #include <linux/mm_types.h>
0016
0017 #include <linux/kbuild.h>
0018
0019 #include <asm/hibernate.h>
0020
0021 #ifdef CONFIG_SPARC32
0022 int sparc32_foo(void)
0023 {
0024 DEFINE(AOFF_thread_fork_kpsr,
0025 offsetof(struct thread_struct, fork_kpsr));
0026 return 0;
0027 }
0028 #else
0029 int sparc64_foo(void)
0030 {
0031 #ifdef CONFIG_HIBERNATION
0032 BLANK();
0033 OFFSET(SC_REG_FP, saved_context, fp);
0034 OFFSET(SC_REG_CWP, saved_context, cwp);
0035 OFFSET(SC_REG_WSTATE, saved_context, wstate);
0036
0037 OFFSET(SC_REG_TICK, saved_context, tick);
0038 OFFSET(SC_REG_PSTATE, saved_context, pstate);
0039
0040 OFFSET(SC_REG_G4, saved_context, g4);
0041 OFFSET(SC_REG_G5, saved_context, g5);
0042 OFFSET(SC_REG_G6, saved_context, g6);
0043 #endif
0044 return 0;
0045 }
0046 #endif
0047
0048 int foo(void)
0049 {
0050 BLANK();
0051 DEFINE(AOFF_task_thread, offsetof(struct task_struct, thread));
0052 BLANK();
0053 DEFINE(AOFF_mm_context, offsetof(struct mm_struct, context));
0054 BLANK();
0055 DEFINE(VMA_VM_MM, offsetof(struct vm_area_struct, vm_mm));
0056
0057
0058 return 0;
0059 }
0060