diff options
Diffstat (limited to 'arch/xtensa/kernel/asm-offsets.c')
-rw-r--r-- | arch/xtensa/kernel/asm-offsets.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/xtensa/kernel/asm-offsets.c b/arch/xtensa/kernel/asm-offsets.c index d0323cd6a2ea..d5ffe7b6443e 100644 --- a/arch/xtensa/kernel/asm-offsets.c +++ b/arch/xtensa/kernel/asm-offsets.c | |||
@@ -18,12 +18,13 @@ | |||
18 | #include <linux/stddef.h> | 18 | #include <linux/stddef.h> |
19 | #include <linux/thread_info.h> | 19 | #include <linux/thread_info.h> |
20 | #include <linux/ptrace.h> | 20 | #include <linux/ptrace.h> |
21 | #include <linux/mm.h> | ||
22 | |||
21 | #include <asm/ptrace.h> | 23 | #include <asm/ptrace.h> |
22 | #include <asm/processor.h> | 24 | #include <asm/processor.h> |
23 | #include <asm/uaccess.h> | 25 | #include <asm/uaccess.h> |
24 | 26 | ||
25 | #define DEFINE(sym, val) asm volatile("\n->" #sym " %0 " #val : : "i" (val)) | 27 | #define DEFINE(sym, val) asm volatile("\n->" #sym " %0 " #val : : "i" (val)) |
26 | #define BLANK() asm volatile("\n->" : : ) | ||
27 | 28 | ||
28 | int main(void) | 29 | int main(void) |
29 | { | 30 | { |
@@ -63,7 +64,6 @@ int main(void) | |||
63 | DEFINE(PT_SIZE, sizeof(struct pt_regs)); | 64 | DEFINE(PT_SIZE, sizeof(struct pt_regs)); |
64 | DEFINE(PT_AREG_END, offsetof (struct pt_regs, areg[XCHAL_NUM_AREGS])); | 65 | DEFINE(PT_AREG_END, offsetof (struct pt_regs, areg[XCHAL_NUM_AREGS])); |
65 | DEFINE(PT_USER_SIZE, offsetof(struct pt_regs, areg[XCHAL_NUM_AREGS])); | 66 | DEFINE(PT_USER_SIZE, offsetof(struct pt_regs, areg[XCHAL_NUM_AREGS])); |
66 | BLANK(); | ||
67 | 67 | ||
68 | /* struct task_struct */ | 68 | /* struct task_struct */ |
69 | DEFINE(TASK_PTRACE, offsetof (struct task_struct, ptrace)); | 69 | DEFINE(TASK_PTRACE, offsetof (struct task_struct, ptrace)); |
@@ -73,27 +73,26 @@ int main(void) | |||
73 | DEFINE(TASK_THREAD, offsetof (struct task_struct, thread)); | 73 | DEFINE(TASK_THREAD, offsetof (struct task_struct, thread)); |
74 | DEFINE(TASK_THREAD_INFO, offsetof (struct task_struct, stack)); | 74 | DEFINE(TASK_THREAD_INFO, offsetof (struct task_struct, stack)); |
75 | DEFINE(TASK_STRUCT_SIZE, sizeof (struct task_struct)); | 75 | DEFINE(TASK_STRUCT_SIZE, sizeof (struct task_struct)); |
76 | BLANK(); | ||
77 | 76 | ||
78 | /* struct thread_info (offset from start_struct) */ | 77 | /* struct thread_info (offset from start_struct) */ |
79 | DEFINE(THREAD_RA, offsetof (struct task_struct, thread.ra)); | 78 | DEFINE(THREAD_RA, offsetof (struct task_struct, thread.ra)); |
80 | DEFINE(THREAD_SP, offsetof (struct task_struct, thread.sp)); | 79 | DEFINE(THREAD_SP, offsetof (struct task_struct, thread.sp)); |
81 | DEFINE(THREAD_CP_SAVE, offsetof (struct task_struct, thread.cp_save)); | 80 | DEFINE(THREAD_CP_SAVE, offsetof (struct task_struct, thread.cp_save)); |
82 | DEFINE(THREAD_CURRENT_DS, offsetof (struct task_struct, thread.current_ds)); | 81 | DEFINE(THREAD_CURRENT_DS, offsetof (struct task_struct, thread.current_ds)); |
83 | BLANK(); | ||
84 | 82 | ||
85 | /* struct mm_struct */ | 83 | /* struct mm_struct */ |
86 | DEFINE(MM_USERS, offsetof(struct mm_struct, mm_users)); | 84 | DEFINE(MM_USERS, offsetof(struct mm_struct, mm_users)); |
87 | DEFINE(MM_PGD, offsetof (struct mm_struct, pgd)); | 85 | DEFINE(MM_PGD, offsetof (struct mm_struct, pgd)); |
88 | DEFINE(MM_CONTEXT, offsetof (struct mm_struct, context)); | 86 | DEFINE(MM_CONTEXT, offsetof (struct mm_struct, context)); |
89 | BLANK(); | 87 | |
90 | DEFINE(PT_SINGLESTEP_BIT, PT_SINGLESTEP_BIT); | 88 | /* struct page */ |
89 | DEFINE(PAGE_FLAGS, offsetof(struct page, flags)); | ||
91 | 90 | ||
92 | /* constants */ | 91 | /* constants */ |
93 | DEFINE(_CLONE_VM, CLONE_VM); | 92 | DEFINE(_CLONE_VM, CLONE_VM); |
94 | DEFINE(_CLONE_UNTRACED, CLONE_UNTRACED); | 93 | DEFINE(_CLONE_UNTRACED, CLONE_UNTRACED); |
94 | DEFINE(PG_ARCH_1, PG_arch_1); | ||
95 | 95 | ||
96 | return 0; | 96 | return 0; |
97 | } | 97 | } |
98 | 98 | ||
99 | |||