diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2013-01-18 04:42:20 -0500 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2013-02-11 09:30:25 -0500 |
commit | cfdbc2e16e65c1ec1c23057640607cee98d1a1bd (patch) | |
tree | 8954eab255b91ae91ac474bb187a64810a14a917 /arch/arc/kernel/asm-offsets.c | |
parent | 79a033c6b946c252c5217907d244cdb37b1114b5 (diff) |
ARC: Build system: Makefiles, Kconfig, Linker script
Arnd in his review pointed out that arch Kconfig organisation has several
deficiencies:
* Build time entries for things which can be runtime extracted from DT
(e.g. SDRAM size, core clk frequency..)
* Not multi-platform-image-build friendly (choice .. endchoice constructs)
* cpu variants support (750/770) is exclusive.
The first 2 have been fixed in subsequent patches.
Due to the nature of the 750 and 770, it is not possible to build for
both together, w/o special runtime glue code which would hurt
performance.
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'arch/arc/kernel/asm-offsets.c')
-rw-r--r-- | arch/arc/kernel/asm-offsets.c | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/arch/arc/kernel/asm-offsets.c b/arch/arc/kernel/asm-offsets.c new file mode 100644 index 000000000000..64b2c2fa7b54 --- /dev/null +++ b/arch/arc/kernel/asm-offsets.c | |||
@@ -0,0 +1,61 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #include <linux/sched.h> | ||
10 | #include <linux/mm.h> | ||
11 | #include <linux/interrupt.h> | ||
12 | #include <linux/thread_info.h> | ||
13 | #include <linux/kbuild.h> | ||
14 | #include <asm/hardirq.h> | ||
15 | #include <asm/page.h> | ||
16 | #include <asm/ptrace.h> | ||
17 | |||
18 | int main(void) | ||
19 | { | ||
20 | DEFINE(TASK_THREAD, offsetof(struct task_struct, thread)); | ||
21 | DEFINE(TASK_THREAD_INFO, offsetof(struct task_struct, stack)); | ||
22 | |||
23 | BLANK(); | ||
24 | |||
25 | DEFINE(THREAD_KSP, offsetof(struct thread_struct, ksp)); | ||
26 | DEFINE(THREAD_CALLEE_REG, offsetof(struct thread_struct, callee_reg)); | ||
27 | DEFINE(THREAD_FAULT_ADDR, | ||
28 | offsetof(struct thread_struct, fault_address)); | ||
29 | |||
30 | BLANK(); | ||
31 | |||
32 | DEFINE(THREAD_INFO_FLAGS, offsetof(struct thread_info, flags)); | ||
33 | DEFINE(THREAD_INFO_PREEMPT_COUNT, | ||
34 | offsetof(struct thread_info, preempt_count)); | ||
35 | |||
36 | BLANK(); | ||
37 | |||
38 | DEFINE(TASK_ACT_MM, offsetof(struct task_struct, active_mm)); | ||
39 | DEFINE(TASK_TGID, offsetof(struct task_struct, tgid)); | ||
40 | |||
41 | DEFINE(MM_CTXT, offsetof(struct mm_struct, context)); | ||
42 | DEFINE(MM_PGD, offsetof(struct mm_struct, pgd)); | ||
43 | |||
44 | DEFINE(MM_CTXT_ASID, offsetof(mm_context_t, asid)); | ||
45 | |||
46 | BLANK(); | ||
47 | |||
48 | DEFINE(PT_status32, offsetof(struct pt_regs, status32)); | ||
49 | DEFINE(PT_orig_r8, offsetof(struct pt_regs, orig_r8)); | ||
50 | DEFINE(PT_sp, offsetof(struct pt_regs, sp)); | ||
51 | DEFINE(PT_r0, offsetof(struct pt_regs, r0)); | ||
52 | DEFINE(PT_r1, offsetof(struct pt_regs, r1)); | ||
53 | DEFINE(PT_r2, offsetof(struct pt_regs, r2)); | ||
54 | DEFINE(PT_r3, offsetof(struct pt_regs, r3)); | ||
55 | DEFINE(PT_r4, offsetof(struct pt_regs, r4)); | ||
56 | DEFINE(PT_r5, offsetof(struct pt_regs, r5)); | ||
57 | DEFINE(PT_r6, offsetof(struct pt_regs, r6)); | ||
58 | DEFINE(PT_r7, offsetof(struct pt_regs, r7)); | ||
59 | |||
60 | return 0; | ||
61 | } | ||