Add the rt linux 4.1.3-rt3 as base
[kvmfornfv.git] / kernel / arch / cris / kernel / asm-offsets.c
1 #include <linux/kbuild.h>
2 #include <linux/sched.h>
3 #include <asm/thread_info.h>
4
5 /*
6  * Generate definitions needed by assembly language modules.
7  * This code generates raw asm output which is post-processed to extract
8  * and format the required data.
9  */
10
11 #if !defined(CONFIG_ETRAX_ARCH_V10) && !defined(CONFIG_ETRAX_ARCH_V32)
12 #error One of ARCH v10 and ARCH v32 must be true!
13 #endif
14
15 int main(void)
16 {
17 #define ENTRY(entry) DEFINE(PT_ ## entry, offsetof(struct pt_regs, entry))
18         ENTRY(orig_r10);
19         ENTRY(r13);
20         ENTRY(r12);
21         ENTRY(r11);
22         ENTRY(r10);
23         ENTRY(r9);
24 #ifdef CONFIG_ETRAX_ARCH_V32
25         ENTRY(acr);
26         ENTRY(srs);
27 #endif
28         ENTRY(mof);
29 #ifdef CONFIG_ETRAX_ARCH_V10
30         ENTRY(dccr);
31 #else
32         ENTRY(ccs);
33 #endif
34         ENTRY(srp);
35         BLANK();
36 #undef ENTRY
37 #define ENTRY(entry) DEFINE(TI_ ## entry, offsetof(struct thread_info, entry))
38         ENTRY(task);
39         ENTRY(flags);
40         ENTRY(preempt_count);
41         BLANK();
42 #undef ENTRY
43 #define ENTRY(entry) DEFINE(THREAD_ ## entry, offsetof(struct thread_struct, entry))
44         ENTRY(ksp);
45         ENTRY(usp);
46 #ifdef CONFIG_ETRAX_ARCH_V10
47         ENTRY(dccr);
48 #else
49         ENTRY(ccs);
50 #endif
51         BLANK();
52 #undef ENTRY
53 #define ENTRY(entry) DEFINE(TASK_ ## entry, offsetof(struct task_struct, entry))
54         ENTRY(pid);
55         BLANK();
56         DEFINE(LCLONE_VM, CLONE_VM);
57         DEFINE(LCLONE_UNTRACED, CLONE_UNTRACED);
58         return 0;
59 }