clean
[linux-2.4.21-pre4.git] / arch / s390 / kernel / asm-offsets.c
1 /*
2  * Generate definitions needed by assembly language modules.
3  * This code generates raw asm output which is post-processed to extract
4  * and format the required data.
5  */
6
7 #include <linux/config.h>
8 #include <linux/sched.h>
9
10 /* Use marker if you need to separate the values later */
11
12 #define DEFINE(sym, val, marker) \
13         asm volatile("\n->" #sym " %0 " #val " " #marker : : "i" (val))
14
15 #define BLANK() asm volatile("\n->" : : )
16
17 int main(void)
18 {
19         DEFINE(__THREAD_ar2, offsetof(struct task_struct, thread.ar2),);
20         DEFINE(__THREAD_ar4, offsetof(struct task_struct, thread.ar4),);
21         DEFINE(__THREAD_ksp, offsetof(struct task_struct, thread.ksp),);
22         DEFINE(__THREAD_per, offsetof(struct task_struct, thread.per_info),);
23         BLANK();
24         DEFINE(__TASK_state, offsetof(struct task_struct, state),);
25         DEFINE(__TASK_sigpending, offsetof(struct task_struct, sigpending),);
26         DEFINE(__TASK_need_resched,
27                offsetof(struct task_struct, need_resched),);
28         DEFINE(__TASK_ptrace, offsetof(struct task_struct, ptrace),);
29         DEFINE(__TASK_processor, offsetof(struct task_struct, processor),);
30
31         return 0;
32 }