diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2008-11-30 00:51:05 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-04 12:17:12 -0500 |
commit | b5db854a91d93c46c6904506ef73ce0d0b074b44 (patch) | |
tree | 817117496b69e30c73b65361655519c4b3d48507 | |
parent | 104495a1ceea7cacff50fa33b48f3c0b6f8d307a (diff) |
sparc,sparc64: unify asm-offsets.c
sparc64 does not use constants generated from asm-offsets
but to prepare it to do so the parts that could be
shared do now generate constants for sparc64 too.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | arch/sparc/kernel/asm-offsets.c | 19 | ||||
-rw-r--r-- | arch/sparc64/kernel/asm-offsets.c | 2 |
2 files changed, 17 insertions, 4 deletions
diff --git a/arch/sparc/kernel/asm-offsets.c b/arch/sparc/kernel/asm-offsets.c index b5bb99ed892c..68f7e1118e9b 100644 --- a/arch/sparc/kernel/asm-offsets.c +++ b/arch/sparc/kernel/asm-offsets.c | |||
@@ -14,15 +14,28 @@ | |||
14 | // #include <linux/mm.h> | 14 | // #include <linux/mm.h> |
15 | #include <linux/kbuild.h> | 15 | #include <linux/kbuild.h> |
16 | 16 | ||
17 | int foo(void) | 17 | #ifdef CONFIG_SPARC32 |
18 | int sparc32_foo(void) | ||
18 | { | 19 | { |
19 | DEFINE(AOFF_task_thread, offsetof(struct task_struct, thread)); | ||
20 | BLANK(); | ||
21 | DEFINE(AOFF_thread_fork_kpsr, | 20 | DEFINE(AOFF_thread_fork_kpsr, |
22 | offsetof(struct thread_struct, fork_kpsr)); | 21 | offsetof(struct thread_struct, fork_kpsr)); |
22 | return 0; | ||
23 | } | ||
24 | #else | ||
25 | int sparc64_foo(void) | ||
26 | { | ||
27 | return 0; | ||
28 | } | ||
29 | #endif | ||
30 | |||
31 | int foo(void) | ||
32 | { | ||
33 | BLANK(); | ||
34 | DEFINE(AOFF_task_thread, offsetof(struct task_struct, thread)); | ||
23 | BLANK(); | 35 | BLANK(); |
24 | DEFINE(AOFF_mm_context, offsetof(struct mm_struct, context)); | 36 | DEFINE(AOFF_mm_context, offsetof(struct mm_struct, context)); |
25 | 37 | ||
26 | /* DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28); */ | 38 | /* DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28); */ |
27 | return 0; | 39 | return 0; |
28 | } | 40 | } |
41 | |||
diff --git a/arch/sparc64/kernel/asm-offsets.c b/arch/sparc64/kernel/asm-offsets.c index 9e263112a6e2..8cbd958d50bd 100644 --- a/arch/sparc64/kernel/asm-offsets.c +++ b/arch/sparc64/kernel/asm-offsets.c | |||
@@ -1 +1 @@ | |||
/* Dummy asm-offsets.c file. Required by kbuild and ready to be used - hint! */ | #include "../../sparc/kernel/asm-offsets.c" | ||