conn rcv_lock converted to spinlock, struct cor_sock created, kernel_packet skb_clone...
[cor_2_6_31.git] / arch / cris / kernel / asm-offsets.c
blobddd6fbbe75de61123abcae19978faaaae4ec7be6
1 #include <linux/sched.h>
2 #include <asm/thread_info.h>
3 #include <linux/autoconf.h>
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 */
11 #define DEFINE(sym, val) \
12 asm volatile("\n->" #sym " %0 " #val : : "i" (val))
14 #define BLANK() asm volatile("\n->" : : )
16 #if !defined(CONFIG_ETRAX_ARCH_V10) && !defined(CONFIG_ETRAX_ARCH_V32)
17 #error One of ARCH v10 and ARCH v32 must be true!
18 #endif
20 int main(void)
22 #define ENTRY(entry) DEFINE(PT_ ## entry, offsetof(struct pt_regs, entry))
23 ENTRY(orig_r10);
24 ENTRY(r13);
25 ENTRY(r12);
26 ENTRY(r11);
27 ENTRY(r10);
28 ENTRY(r9);
29 #ifdef CONFIG_ETRAX_ARCH_V32
30 ENTRY(acr);
31 ENTRY(srs);
32 #endif
33 ENTRY(mof);
34 #ifdef CONFIG_ETRAX_ARCH_V10
35 ENTRY(dccr);
36 #else
37 ENTRY(ccs);
38 #endif
39 ENTRY(srp);
40 BLANK();
41 #undef ENTRY
42 #define ENTRY(entry) DEFINE(TI_ ## entry, offsetof(struct thread_info, entry))
43 ENTRY(task);
44 ENTRY(flags);
45 ENTRY(preempt_count);
46 BLANK();
47 #undef ENTRY
48 #define ENTRY(entry) DEFINE(THREAD_ ## entry, offsetof(struct thread_struct, entry))
49 ENTRY(ksp);
50 ENTRY(usp);
51 #ifdef CONFIG_ETRAX_ARCH_V10
52 ENTRY(dccr);
53 #else
54 ENTRY(ccs);
55 #endif
56 BLANK();
57 #undef ENTRY
58 #define ENTRY(entry) DEFINE(TASK_ ## entry, offsetof(struct task_struct, entry))
59 ENTRY(pid);
60 BLANK();
61 DEFINE(LCLONE_VM, CLONE_VM);
62 DEFINE(LCLONE_UNTRACED, CLONE_UNTRACED);
63 return 0;