blob: a5fd88d816a6c590d145808eecdd7196b9a4ee72 [file] [log] [blame]
James Hogan8e6b4dd2012-10-11 11:00:58 +02001#include <linux/kbuild.h>
Jesper Nilsson0365f702008-10-21 22:10:27 +02002#include <linux/sched.h>
3#include <asm/thread_info.h>
Jesper Nilsson0365f702008-10-21 22:10:27 +02004
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
Jesper Nilsson0365f702008-10-21 22:10:27 +020011#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
15int 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}