aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2008-12-25 07:38:40 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-12-25 07:38:56 -0500
commit320c04c068c62b71fe9ea55e06e4968b4edc9e48 (patch)
tree8f98e0d681ecbc4141552289bb676c8f4ae8109a /arch/s390/include
parentca9fc75a68ee98812bb6d212405fea039421910b (diff)
[S390] Move stfle to header file.
stfle will be needed by the ap_bus module to figure out wether the AP queue adapter interruption facility is installed. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include')
-rw-r--r--arch/s390/include/asm/system.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/arch/s390/include/asm/system.h b/arch/s390/include/asm/system.h
index 819e7d99ca0c..c17a3cfbe242 100644
--- a/arch/s390/include/asm/system.h
+++ b/arch/s390/include/asm/system.h
@@ -12,6 +12,7 @@
12#define __ASM_SYSTEM_H 12#define __ASM_SYSTEM_H
13 13
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <linux/errno.h>
15#include <asm/types.h> 16#include <asm/types.h>
16#include <asm/ptrace.h> 17#include <asm/ptrace.h>
17#include <asm/setup.h> 18#include <asm/setup.h>
@@ -413,8 +414,6 @@ __set_psw_mask(unsigned long mask)
413#define local_mcck_enable() __set_psw_mask(psw_kernel_bits) 414#define local_mcck_enable() __set_psw_mask(psw_kernel_bits)
414#define local_mcck_disable() __set_psw_mask(psw_kernel_bits & ~PSW_MASK_MCHECK) 415#define local_mcck_disable() __set_psw_mask(psw_kernel_bits & ~PSW_MASK_MCHECK)
415 416
416int stfle(unsigned long long *list, int doublewords);
417
418#ifdef CONFIG_SMP 417#ifdef CONFIG_SMP
419 418
420extern void smp_ctl_set_bit(int cr, int bit); 419extern void smp_ctl_set_bit(int cr, int bit);
@@ -438,6 +437,23 @@ static inline unsigned int stfl(void)
438 return S390_lowcore.stfl_fac_list; 437 return S390_lowcore.stfl_fac_list;
439} 438}
440 439
440static inline int __stfle(unsigned long long *list, int doublewords)
441{
442 typedef struct { unsigned long long _[doublewords]; } addrtype;
443 register unsigned long __nr asm("0") = doublewords - 1;
444
445 asm volatile(".insn s,0xb2b00000,%0" /* stfle */
446 : "=m" (*(addrtype *) list), "+d" (__nr) : : "cc");
447 return __nr + 1;
448}
449
450static inline int stfle(unsigned long long *list, int doublewords)
451{
452 if (!(stfl() & (1UL << 24)))
453 return -EOPNOTSUPP;
454 return __stfle(list, doublewords);
455}
456
441static inline unsigned short stap(void) 457static inline unsigned short stap(void)
442{ 458{
443 unsigned short cpu_address; 459 unsigned short cpu_address;