avoid endless loops in lib/swiotlb.c
[wrt350n-kernel.git] / arch / cris / arch-v10 / kernel / asm-offsets.c
blob1aa3cc4e7107f2b83de77f310bfddfa55ee77437
1 #include <linux/sched.h>
2 #include <asm/thread_info.h>
4 /*
5 * Generate definitions needed by assembly language modules.
6 * This code generates raw asm output which is post-processed to extract
7 * and format the required data.
8 */
10 #define DEFINE(sym, val) \
11 asm volatile("\n->" #sym " %0 " #val : : "i" (val))
13 #define BLANK() asm volatile("\n->" : : )
15 int main(void)
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 ENTRY(mof);
25 ENTRY(dccr);
26 ENTRY(srp);
27 BLANK();
28 #undef ENTRY
29 #define ENTRY(entry) DEFINE(TI_ ## entry, offsetof(struct thread_info, entry))
30 ENTRY(task);
31 ENTRY(flags);
32 ENTRY(preempt_count);
33 BLANK();
34 #undef ENTRY
35 #define ENTRY(entry) DEFINE(THREAD_ ## entry, offsetof(struct thread_struct, entry))
36 ENTRY(ksp);
37 ENTRY(usp);
38 ENTRY(dccr);
39 BLANK();
40 #undef ENTRY
41 #define ENTRY(entry) DEFINE(TASK_ ## entry, offsetof(struct task_struct, entry))
42 ENTRY(pid);
43 BLANK();
44 DEFINE(LCLONE_VM, CLONE_VM);
45 DEFINE(LCLONE_UNTRACED, CLONE_UNTRACED);
46 return 0;