diff options
Diffstat (limited to 'arch/s390/include/asm/system.h')
-rw-r--r-- | arch/s390/include/asm/system.h | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/arch/s390/include/asm/system.h b/arch/s390/include/asm/system.h index 819e7d99ca0c..024ef42ed6d7 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> |
@@ -98,13 +99,9 @@ static inline void restore_access_regs(unsigned int *acrs) | |||
98 | prev = __switch_to(prev,next); \ | 99 | prev = __switch_to(prev,next); \ |
99 | } while (0) | 100 | } while (0) |
100 | 101 | ||
101 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | ||
102 | extern void account_vtime(struct task_struct *); | 102 | extern void account_vtime(struct task_struct *); |
103 | extern void account_tick_vtime(struct task_struct *); | 103 | extern void account_tick_vtime(struct task_struct *); |
104 | extern void account_system_vtime(struct task_struct *); | 104 | extern void account_system_vtime(struct task_struct *); |
105 | #else | ||
106 | #define account_vtime(x) do { /* empty */ } while (0) | ||
107 | #endif | ||
108 | 105 | ||
109 | #ifdef CONFIG_PFAULT | 106 | #ifdef CONFIG_PFAULT |
110 | extern void pfault_irq_init(void); | 107 | extern void pfault_irq_init(void); |
@@ -413,8 +410,6 @@ __set_psw_mask(unsigned long mask) | |||
413 | #define local_mcck_enable() __set_psw_mask(psw_kernel_bits) | 410 | #define local_mcck_enable() __set_psw_mask(psw_kernel_bits) |
414 | #define local_mcck_disable() __set_psw_mask(psw_kernel_bits & ~PSW_MASK_MCHECK) | 411 | #define local_mcck_disable() __set_psw_mask(psw_kernel_bits & ~PSW_MASK_MCHECK) |
415 | 412 | ||
416 | int stfle(unsigned long long *list, int doublewords); | ||
417 | |||
418 | #ifdef CONFIG_SMP | 413 | #ifdef CONFIG_SMP |
419 | 414 | ||
420 | extern void smp_ctl_set_bit(int cr, int bit); | 415 | extern void smp_ctl_set_bit(int cr, int bit); |
@@ -438,6 +433,23 @@ static inline unsigned int stfl(void) | |||
438 | return S390_lowcore.stfl_fac_list; | 433 | return S390_lowcore.stfl_fac_list; |
439 | } | 434 | } |
440 | 435 | ||
436 | static inline int __stfle(unsigned long long *list, int doublewords) | ||
437 | { | ||
438 | typedef struct { unsigned long long _[doublewords]; } addrtype; | ||
439 | register unsigned long __nr asm("0") = doublewords - 1; | ||
440 | |||
441 | asm volatile(".insn s,0xb2b00000,%0" /* stfle */ | ||
442 | : "=m" (*(addrtype *) list), "+d" (__nr) : : "cc"); | ||
443 | return __nr + 1; | ||
444 | } | ||
445 | |||
446 | static inline int stfle(unsigned long long *list, int doublewords) | ||
447 | { | ||
448 | if (!(stfl() & (1UL << 24))) | ||
449 | return -EOPNOTSUPP; | ||
450 | return __stfle(list, doublewords); | ||
451 | } | ||
452 | |||
441 | static inline unsigned short stap(void) | 453 | static inline unsigned short stap(void) |
442 | { | 454 | { |
443 | unsigned short cpu_address; | 455 | unsigned short cpu_address; |