diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2010-02-26 16:37:43 -0500 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2010-02-26 16:37:31 -0500 |
commit | cbb870c8221147ae337612e04b2bb0211f31a74b (patch) | |
tree | aa0c80fde4a271d8a366afc76912c5dacdb7542a /arch/s390/kernel/smp.c | |
parent | d96221ab1e7d86dc0d4666466979117cd1915386 (diff) |
[S390] Cleanup struct _lowcore usage and defines.
Use asm offsets to make sure the offset defines to struct _lowcore and
its layout don't get out of sync.
Also add a BUILD_BUG_ON() which checks that the size of the structure
is sane.
And while being at it change those sites which use odd casts to access
the current lowcore. These should use S390_lowcore instead.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/smp.c')
-rw-r--r-- | arch/s390/kernel/smp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index d8a0b115c7c1..8b10127c00ad 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/cpu.h> | 36 | #include <linux/cpu.h> |
37 | #include <linux/timex.h> | 37 | #include <linux/timex.h> |
38 | #include <linux/bootmem.h> | 38 | #include <linux/bootmem.h> |
39 | #include <asm/asm-offsets.h> | ||
39 | #include <asm/ipl.h> | 40 | #include <asm/ipl.h> |
40 | #include <asm/setup.h> | 41 | #include <asm/setup.h> |
41 | #include <asm/sigp.h> | 42 | #include <asm/sigp.h> |
@@ -121,7 +122,7 @@ void smp_switch_to_ipl_cpu(void (*func)(void *), void *data) | |||
121 | sp -= sizeof(struct pt_regs); | 122 | sp -= sizeof(struct pt_regs); |
122 | regs = (struct pt_regs *) sp; | 123 | regs = (struct pt_regs *) sp; |
123 | memcpy(®s->gprs, ¤t_lc->gpregs_save_area, sizeof(regs->gprs)); | 124 | memcpy(®s->gprs, ¤t_lc->gpregs_save_area, sizeof(regs->gprs)); |
124 | memcpy(®s->psw, ¤t_lc->st_status_fixed_logout, sizeof(psw_t)); | 125 | regs->psw = lc->psw_save_area; |
125 | sp -= STACK_FRAME_OVERHEAD; | 126 | sp -= STACK_FRAME_OVERHEAD; |
126 | sf = (struct stack_frame *) sp; | 127 | sf = (struct stack_frame *) sp; |
127 | sf->back_chain = regs->gprs[15]; | 128 | sf->back_chain = regs->gprs[15]; |