aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/system.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-12-28 15:33:21 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-12-28 15:33:21 -0500
commit1db2a5c11e495366bff35cf7445d494703f7febe (patch)
tree3347dd1cab0a2a96a4333524298a62132eb22336 /arch/s390/include/asm/system.h
parenta39b863342b8aba52390092be95db58f6ed56061 (diff)
parentcef7125def4dd104769f400c941199614da0aca1 (diff)
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: (85 commits) [S390] provide documentation for hvc_iucv kernel parameter. [S390] convert ctcm printks to dev_xxx and pr_xxx macros. [S390] convert zfcp printks to pr_xxx macros. [S390] convert vmlogrdr printks to pr_xxx macros. [S390] convert zfcp dumper printks to pr_xxx macros. [S390] convert cpu related printks to pr_xxx macros. [S390] convert qeth printks to dev_xxx and pr_xxx macros. [S390] convert sclp printks to pr_xxx macros. [S390] convert iucv printks to dev_xxx and pr_xxx macros. [S390] convert ap_bus printks to pr_xxx macros. [S390] convert dcssblk and extmem printks messages to pr_xxx macros. [S390] convert monwriter printks to pr_xxx macros. [S390] convert s390 debug feature printks to pr_xxx macros. [S390] convert monreader printks to pr_xxx macros. [S390] convert appldata printks to pr_xxx macros. [S390] convert setup printks to pr_xxx macros. [S390] convert hypfs printks to pr_xxx macros. [S390] convert time printks to pr_xxx macros. [S390] convert cpacf printks to pr_xxx macros. [S390] convert cio printks to pr_xxx macros. ...
Diffstat (limited to 'arch/s390/include/asm/system.h')
-rw-r--r--arch/s390/include/asm/system.h24
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
102extern void account_vtime(struct task_struct *); 102extern void account_vtime(struct task_struct *);
103extern void account_tick_vtime(struct task_struct *); 103extern void account_tick_vtime(struct task_struct *);
104extern void account_system_vtime(struct task_struct *); 104extern 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
110extern void pfault_irq_init(void); 107extern 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
416int stfle(unsigned long long *list, int doublewords);
417
418#ifdef CONFIG_SMP 413#ifdef CONFIG_SMP
419 414
420extern void smp_ctl_set_bit(int cr, int bit); 415extern 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
436static 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
446static 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
441static inline unsigned short stap(void) 453static inline unsigned short stap(void)
442{ 454{
443 unsigned short cpu_address; 455 unsigned short cpu_address;