diff options
| author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2008-04-30 07:38:43 -0400 |
|---|---|---|
| committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-04-30 07:38:46 -0400 |
| commit | 484875b11f355b1b54d508a3f4671888f07e643c (patch) | |
| tree | ff639e4bd108e48f4b3ab7789e1c0e880453b034 | |
| parent | ccf183e469be89e065ed389da9d3f50bd2faa215 (diff) | |
[S390] Move stfl to system.h and delete duplicated version.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| -rw-r--r-- | arch/s390/kernel/setup.c | 9 | ||||
| -rw-r--r-- | arch/s390/kvm/priv.c | 11 | ||||
| -rw-r--r-- | include/asm-s390/system.h | 10 |
3 files changed, 11 insertions, 19 deletions
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index a9d18aafa5f4..024180e25e85 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
| @@ -683,15 +683,6 @@ setup_memory(void) | |||
| 683 | #endif | 683 | #endif |
| 684 | } | 684 | } |
| 685 | 685 | ||
| 686 | static __init unsigned int stfl(void) | ||
| 687 | { | ||
| 688 | asm volatile( | ||
| 689 | " .insn s,0xb2b10000,0(0)\n" /* stfl */ | ||
| 690 | "0:\n" | ||
| 691 | EX_TABLE(0b,0b)); | ||
| 692 | return S390_lowcore.stfl_fac_list; | ||
| 693 | } | ||
| 694 | |||
| 695 | static int __init __stfle(unsigned long long *list, int doublewords) | 686 | static int __init __stfle(unsigned long long *list, int doublewords) |
| 696 | { | 687 | { |
| 697 | typedef struct { unsigned long long _[doublewords]; } addrtype; | 688 | typedef struct { unsigned long long _[doublewords]; } addrtype; |
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c index 1465946325c5..c02286c6a931 100644 --- a/arch/s390/kvm/priv.c +++ b/arch/s390/kvm/priv.c | |||
| @@ -151,18 +151,9 @@ static int handle_chsc(struct kvm_vcpu *vcpu) | |||
| 151 | return 0; | 151 | return 0; |
| 152 | } | 152 | } |
| 153 | 153 | ||
| 154 | static unsigned int kvm_stfl(void) | ||
| 155 | { | ||
| 156 | asm volatile( | ||
| 157 | " .insn s,0xb2b10000,0(0)\n" /* stfl */ | ||
| 158 | "0:\n" | ||
| 159 | EX_TABLE(0b, 0b)); | ||
| 160 | return S390_lowcore.stfl_fac_list; | ||
| 161 | } | ||
| 162 | |||
| 163 | static int handle_stfl(struct kvm_vcpu *vcpu) | 154 | static int handle_stfl(struct kvm_vcpu *vcpu) |
| 164 | { | 155 | { |
| 165 | unsigned int facility_list = kvm_stfl(); | 156 | unsigned int facility_list = stfl(); |
| 166 | int rc; | 157 | int rc; |
| 167 | 158 | ||
| 168 | vcpu->stat.instruction_stfl++; | 159 | vcpu->stat.instruction_stfl++; |
diff --git a/include/asm-s390/system.h b/include/asm-s390/system.h index 92098df4d6e3..79bdbf4b33a7 100644 --- a/include/asm-s390/system.h +++ b/include/asm-s390/system.h | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include <asm/ptrace.h> | 16 | #include <asm/ptrace.h> |
| 17 | #include <asm/setup.h> | 17 | #include <asm/setup.h> |
| 18 | #include <asm/processor.h> | 18 | #include <asm/processor.h> |
| 19 | #include <asm/lowcore.h> | ||
| 19 | 20 | ||
| 20 | #ifdef __KERNEL__ | 21 | #ifdef __KERNEL__ |
| 21 | 22 | ||
| @@ -422,6 +423,15 @@ extern void smp_ctl_clear_bit(int cr, int bit); | |||
| 422 | 423 | ||
| 423 | #endif /* CONFIG_SMP */ | 424 | #endif /* CONFIG_SMP */ |
| 424 | 425 | ||
| 426 | static inline unsigned int stfl(void) | ||
| 427 | { | ||
| 428 | asm volatile( | ||
| 429 | " .insn s,0xb2b10000,0(0)\n" /* stfl */ | ||
| 430 | "0:\n" | ||
| 431 | EX_TABLE(0b,0b)); | ||
| 432 | return S390_lowcore.stfl_fac_list; | ||
| 433 | } | ||
| 434 | |||
| 425 | extern void (*_machine_restart)(char *command); | 435 | extern void (*_machine_restart)(char *command); |
| 426 | extern void (*_machine_halt)(void); | 436 | extern void (*_machine_halt)(void); |
| 427 | extern void (*_machine_power_off)(void); | 437 | extern void (*_machine_power_off)(void); |
