aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/asm-offsets.c
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2008-04-29 04:04:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 11:06:30 -0400
commit4ca4d7bf7a650817c441073cb8d1c2c8dfbb9959 (patch)
treeb58fcddb4266949822e5e2118fb258694458dccb /arch/s390/kernel/asm-offsets.c
parent7a88d7a8f467e4ab1d3393ed5bce3d68cdf9be2e (diff)
s390: use kbuild.h instead of defining macros in asm-offsets.c
New version that does not preserve the marker. Arch maintainers indicate that the marker functionality is is not needed anymore. Note you may simplify the s390 asm-offsets.c code further if you use the OFFSET() macro instead of the DEFINE. See kbuild.h Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/s390/kernel/asm-offsets.c')
-rw-r--r--arch/s390/kernel/asm-offsets.c51
1 files changed, 23 insertions, 28 deletions
diff --git a/arch/s390/kernel/asm-offsets.c b/arch/s390/kernel/asm-offsets.c
index f7807b81c474..fa28ecae636b 100644
--- a/arch/s390/kernel/asm-offsets.c
+++ b/arch/s390/kernel/asm-offsets.c
@@ -7,41 +7,36 @@
7#include <linux/sched.h> 7#include <linux/sched.h>
8#include <linux/kbuild.h> 8#include <linux/kbuild.h>
9 9
10/* Use marker if you need to separate the values later */
11#undef DEFINE
12#define DEFINE(sym, val, marker) \
13 asm volatile("\n->" #sym " %0 " #val " " #marker : : "i" (val))
14
15int main(void) 10int main(void)
16{ 11{
17 DEFINE(__THREAD_info, offsetof(struct task_struct, stack),); 12 DEFINE(__THREAD_info, offsetof(struct task_struct, stack));
18 DEFINE(__THREAD_ksp, offsetof(struct task_struct, thread.ksp),); 13 DEFINE(__THREAD_ksp, offsetof(struct task_struct, thread.ksp));
19 DEFINE(__THREAD_per, offsetof(struct task_struct, thread.per_info),); 14 DEFINE(__THREAD_per, offsetof(struct task_struct, thread.per_info));
20 DEFINE(__THREAD_mm_segment, 15 DEFINE(__THREAD_mm_segment,
21 offsetof(struct task_struct, thread.mm_segment),); 16 offsetof(struct task_struct, thread.mm_segment));
22 BLANK(); 17 BLANK();
23 DEFINE(__TASK_pid, offsetof(struct task_struct, pid),); 18 DEFINE(__TASK_pid, offsetof(struct task_struct, pid));
24 BLANK(); 19 BLANK();
25 DEFINE(__PER_atmid, offsetof(per_struct, lowcore.words.perc_atmid),); 20 DEFINE(__PER_atmid, offsetof(per_struct, lowcore.words.perc_atmid));
26 DEFINE(__PER_address, offsetof(per_struct, lowcore.words.address),); 21 DEFINE(__PER_address, offsetof(per_struct, lowcore.words.address));
27 DEFINE(__PER_access_id, offsetof(per_struct, lowcore.words.access_id),); 22 DEFINE(__PER_access_id, offsetof(per_struct, lowcore.words.access_id));
28 BLANK(); 23 BLANK();
29 DEFINE(__TI_task, offsetof(struct thread_info, task),); 24 DEFINE(__TI_task, offsetof(struct thread_info, task));
30 DEFINE(__TI_domain, offsetof(struct thread_info, exec_domain),); 25 DEFINE(__TI_domain, offsetof(struct thread_info, exec_domain));
31 DEFINE(__TI_flags, offsetof(struct thread_info, flags),); 26 DEFINE(__TI_flags, offsetof(struct thread_info, flags));
32 DEFINE(__TI_cpu, offsetof(struct thread_info, cpu),); 27 DEFINE(__TI_cpu, offsetof(struct thread_info, cpu));
33 DEFINE(__TI_precount, offsetof(struct thread_info, preempt_count),); 28 DEFINE(__TI_precount, offsetof(struct thread_info, preempt_count));
34 BLANK(); 29 BLANK();
35 DEFINE(__PT_ARGS, offsetof(struct pt_regs, args),); 30 DEFINE(__PT_ARGS, offsetof(struct pt_regs, args));
36 DEFINE(__PT_PSW, offsetof(struct pt_regs, psw),); 31 DEFINE(__PT_PSW, offsetof(struct pt_regs, psw));
37 DEFINE(__PT_GPRS, offsetof(struct pt_regs, gprs),); 32 DEFINE(__PT_GPRS, offsetof(struct pt_regs, gprs));
38 DEFINE(__PT_ORIG_GPR2, offsetof(struct pt_regs, orig_gpr2),); 33 DEFINE(__PT_ORIG_GPR2, offsetof(struct pt_regs, orig_gpr2));
39 DEFINE(__PT_ILC, offsetof(struct pt_regs, ilc),); 34 DEFINE(__PT_ILC, offsetof(struct pt_regs, ilc));
40 DEFINE(__PT_TRAP, offsetof(struct pt_regs, trap),); 35 DEFINE(__PT_TRAP, offsetof(struct pt_regs, trap));
41 DEFINE(__PT_SIZE, sizeof(struct pt_regs),); 36 DEFINE(__PT_SIZE, sizeof(struct pt_regs));
42 BLANK(); 37 BLANK();
43 DEFINE(__SF_BACKCHAIN, offsetof(struct stack_frame, back_chain),); 38 DEFINE(__SF_BACKCHAIN, offsetof(struct stack_frame, back_chain));
44 DEFINE(__SF_GPRS, offsetof(struct stack_frame, gprs),); 39 DEFINE(__SF_GPRS, offsetof(struct stack_frame, gprs));
45 DEFINE(__SF_EMPTY, offsetof(struct stack_frame, empty1),); 40 DEFINE(__SF_EMPTY, offsetof(struct stack_frame, empty1));
46 return 0; 41 return 0;
47} 42}