aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
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 /arch/s390
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>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kernel/setup.c11
1 files changed, 9 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 }