]> git.ipfire.org Git - thirdparty/kernel/linux.git/blob - arch/cris/kernel/asm-offsets.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[thirdparty/kernel/linux.git] / arch / cris / kernel / asm-offsets.c
1 // SPDX-License-Identifier: GPL-2.0
2 #include <linux/kbuild.h>
3 #include <linux/sched.h>
4 #include <asm/thread_info.h>
5
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.
10 */
11
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
15
16 int main(void)
17 {
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;
60 }