aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-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 }