aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2008-04-17 01:46:11 -0400
committerHeiko Carstens <heiko.carstens@de.ibm.com>2008-04-17 01:47:01 -0400
commit7b758389a29cb7f456ec2d27b7a08cb3cc4e1f1c (patch)
treecd0c7a988815826cfabc2c90cd8539a7eb9f0c8c
parentcbce70e687bf9c7968d63f058b4c3d2e90008ce2 (diff)
[S390] Export stfle.
Make stfle visible so other code can call this. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
-rw-r--r--arch/s390/kernel/setup.c11
-rw-r--r--include/asm-s390/system.h2
2 files changed, 11 insertions, 2 deletions
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 290e504061a3..d682ff135a1c 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -687,7 +687,7 @@ static __init unsigned int stfl(void)
687 return S390_lowcore.stfl_fac_list; 687 return S390_lowcore.stfl_fac_list;
688} 688}
689 689
690static __init int stfle(unsigned long long *list, int doublewords) 690static int __init __stfle(unsigned long long *list, int doublewords)
691{ 691{
692 typedef struct { unsigned long long _[doublewords]; } addrtype; 692 typedef struct { unsigned long long _[doublewords]; } addrtype;
693 register unsigned long __nr asm("0") = doublewords - 1; 693 register unsigned long __nr asm("0") = doublewords - 1;
@@ -697,6 +697,13 @@ static __init int stfle(unsigned long long *list, int doublewords)
697 return __nr + 1; 697 return __nr + 1;
698} 698}
699 699
700int __init stfle(unsigned long long *list, int doublewords)
701{
702 if (!(stfl() & (1UL << 24)))
703 return -EOPNOTSUPP;
704 return __stfle(list, doublewords);
705}
706
700/* 707/*
701 * Setup hardware capabilities. 708 * Setup hardware capabilities.
702 */ 709 */
@@ -741,7 +748,7 @@ static void __init setup_hwcaps(void)
741 * HWCAP_S390_DFP bit 6. 748 * HWCAP_S390_DFP bit 6.
742 */ 749 */
743 if ((elf_hwcap & (1UL << 2)) && 750 if ((elf_hwcap & (1UL << 2)) &&
744 stfle(&facility_list_extended, 1) > 0) { 751 __stfle(&facility_list_extended, 1) > 0) {
745 if (facility_list_extended & (1ULL << (64 - 43))) 752 if (facility_list_extended & (1ULL << (64 - 43)))
746 elf_hwcap |= 1UL << 6; 753 elf_hwcap |= 1UL << 6;
747 } 754 }
diff --git a/include/asm-s390/system.h b/include/asm-s390/system.h
index 15aba30601a3..92098df4d6e3 100644
--- a/include/asm-s390/system.h
+++ b/include/asm-s390/system.h
@@ -406,6 +406,8 @@ __set_psw_mask(unsigned long mask)
406#define local_mcck_enable() __set_psw_mask(psw_kernel_bits) 406#define local_mcck_enable() __set_psw_mask(psw_kernel_bits)
407#define local_mcck_disable() __set_psw_mask(psw_kernel_bits & ~PSW_MASK_MCHECK) 407#define local_mcck_disable() __set_psw_mask(psw_kernel_bits & ~PSW_MASK_MCHECK)
408 408
409int stfle(unsigned long long *list, int doublewords);
410
409#ifdef CONFIG_SMP 411#ifdef CONFIG_SMP
410 412
411extern void smp_ctl_set_bit(int cr, int bit); 413extern void smp_ctl_set_bit(int cr, int bit);