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/kvm | |
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/kvm')
-rw-r--r-- | arch/s390/kvm/interrupt.c | 10 | ||||
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 1 |
2 files changed, 6 insertions, 5 deletions
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index da20c3df3ec1..834774d8d5f3 100644 --- a/arch/s390/kvm/interrupt.c +++ b/arch/s390/kvm/interrupt.c | |||
@@ -10,12 +10,12 @@ | |||
10 | * Author(s): Carsten Otte <cotte@de.ibm.com> | 10 | * Author(s): Carsten Otte <cotte@de.ibm.com> |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <asm/lowcore.h> | ||
14 | #include <asm/uaccess.h> | ||
15 | #include <linux/hrtimer.h> | ||
16 | #include <linux/interrupt.h> | 13 | #include <linux/interrupt.h> |
17 | #include <linux/kvm_host.h> | 14 | #include <linux/kvm_host.h> |
15 | #include <linux/hrtimer.h> | ||
18 | #include <linux/signal.h> | 16 | #include <linux/signal.h> |
17 | #include <asm/asm-offsets.h> | ||
18 | #include <asm/uaccess.h> | ||
19 | #include "kvm-s390.h" | 19 | #include "kvm-s390.h" |
20 | #include "gaccess.h" | 20 | #include "gaccess.h" |
21 | 21 | ||
@@ -187,8 +187,8 @@ static void __do_deliver_interrupt(struct kvm_vcpu *vcpu, | |||
187 | if (rc == -EFAULT) | 187 | if (rc == -EFAULT) |
188 | exception = 1; | 188 | exception = 1; |
189 | 189 | ||
190 | rc = put_guest_u64(vcpu, __LC_PFAULT_INTPARM, | 190 | rc = put_guest_u64(vcpu, __LC_EXT_PARAMS2, |
191 | inti->ext.ext_params2); | 191 | inti->ext.ext_params2); |
192 | if (rc == -EFAULT) | 192 | if (rc == -EFAULT) |
193 | exception = 1; | 193 | exception = 1; |
194 | break; | 194 | break; |
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 7f19340481b7..3fa0a10e4668 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
25 | #include <linux/timer.h> | 25 | #include <linux/timer.h> |
26 | #include <asm/asm-offsets.h> | ||
26 | #include <asm/lowcore.h> | 27 | #include <asm/lowcore.h> |
27 | #include <asm/pgtable.h> | 28 | #include <asm/pgtable.h> |
28 | #include <asm/nmi.h> | 29 | #include <asm/nmi.h> |