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