Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Heiko Carstens and committed by
Martin Schwidefsky
320c04c0 ca9fc75a

+18 -19
+18 -2
arch/s390/include/asm/system.h
··· 12 12 #define __ASM_SYSTEM_H 13 13 14 14 #include <linux/kernel.h> 15 + #include <linux/errno.h> 15 16 #include <asm/types.h> 16 17 #include <asm/ptrace.h> 17 18 #include <asm/setup.h> ··· 414 413 #define local_mcck_enable() __set_psw_mask(psw_kernel_bits) 415 414 #define local_mcck_disable() __set_psw_mask(psw_kernel_bits & ~PSW_MASK_MCHECK) 416 415 417 - int stfle(unsigned long long *list, int doublewords); 418 - 419 416 #ifdef CONFIG_SMP 420 417 421 418 extern void smp_ctl_set_bit(int cr, int bit); ··· 435 436 "0:\n" 436 437 EX_TABLE(0b,0b)); 437 438 return S390_lowcore.stfl_fac_list; 439 + } 440 + 441 + static inline int __stfle(unsigned long long *list, int doublewords) 442 + { 443 + typedef struct { unsigned long long _[doublewords]; } addrtype; 444 + register unsigned long __nr asm("0") = doublewords - 1; 445 + 446 + asm volatile(".insn s,0xb2b00000,%0" /* stfle */ 447 + : "=m" (*(addrtype *) list), "+d" (__nr) : : "cc"); 448 + return __nr + 1; 449 + } 450 + 451 + static inline int stfle(unsigned long long *list, int doublewords) 452 + { 453 + if (!(stfl() & (1UL << 24))) 454 + return -EOPNOTSUPP; 455 + return __stfle(list, doublewords); 438 456 } 439 457 440 458 static inline unsigned short stap(void)
-17
arch/s390/kernel/setup.c
··· 651 651 #endif 652 652 } 653 653 654 - static int __init __stfle(unsigned long long *list, int doublewords) 655 - { 656 - typedef struct { unsigned long long _[doublewords]; } addrtype; 657 - register unsigned long __nr asm("0") = doublewords - 1; 658 - 659 - asm volatile(".insn s,0xb2b00000,%0" /* stfle */ 660 - : "=m" (*(addrtype *) list), "+d" (__nr) : : "cc"); 661 - return __nr + 1; 662 - } 663 - 664 - int __init stfle(unsigned long long *list, int doublewords) 665 - { 666 - if (!(stfl() & (1UL << 24))) 667 - return -EOPNOTSUPP; 668 - return __stfle(list, doublewords); 669 - } 670 - 671 654 /* 672 655 * Setup hardware capabilities. 673 656 */