diff options
Diffstat (limited to 'arch/s390/kernel/setup.c')
-rw-r--r-- | arch/s390/kernel/setup.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index c8e8e1354e1..e3ceb911dc7 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -409,6 +409,9 @@ setup_lowcore(void) | |||
409 | lc->current_task = (unsigned long) init_thread_union.thread_info.task; | 409 | lc->current_task = (unsigned long) init_thread_union.thread_info.task; |
410 | lc->thread_info = (unsigned long) &init_thread_union; | 410 | lc->thread_info = (unsigned long) &init_thread_union; |
411 | lc->machine_flags = S390_lowcore.machine_flags; | 411 | lc->machine_flags = S390_lowcore.machine_flags; |
412 | lc->stfl_fac_list = S390_lowcore.stfl_fac_list; | ||
413 | memcpy(lc->stfle_fac_list, S390_lowcore.stfle_fac_list, | ||
414 | MAX_FACILITY_BIT/8); | ||
412 | #ifndef CONFIG_64BIT | 415 | #ifndef CONFIG_64BIT |
413 | if (MACHINE_HAS_IEEE) { | 416 | if (MACHINE_HAS_IEEE) { |
414 | lc->extended_save_area_addr = (__u32) | 417 | lc->extended_save_area_addr = (__u32) |
@@ -627,7 +630,8 @@ setup_memory(void) | |||
627 | add_active_range(0, start_chunk, end_chunk); | 630 | add_active_range(0, start_chunk, end_chunk); |
628 | pfn = max(start_chunk, start_pfn); | 631 | pfn = max(start_chunk, start_pfn); |
629 | for (; pfn < end_chunk; pfn++) | 632 | for (; pfn < end_chunk; pfn++) |
630 | page_set_storage_key(PFN_PHYS(pfn), PAGE_DEFAULT_KEY); | 633 | page_set_storage_key(PFN_PHYS(pfn), |
634 | PAGE_DEFAULT_KEY, 0); | ||
631 | } | 635 | } |
632 | 636 | ||
633 | psw_set_key(PAGE_DEFAULT_KEY); | 637 | psw_set_key(PAGE_DEFAULT_KEY); |
@@ -674,12 +678,9 @@ setup_memory(void) | |||
674 | static void __init setup_hwcaps(void) | 678 | static void __init setup_hwcaps(void) |
675 | { | 679 | { |
676 | static const int stfl_bits[6] = { 0, 2, 7, 17, 19, 21 }; | 680 | static const int stfl_bits[6] = { 0, 2, 7, 17, 19, 21 }; |
677 | unsigned long long facility_list_extended; | ||
678 | unsigned int facility_list; | ||
679 | struct cpuid cpu_id; | 681 | struct cpuid cpu_id; |
680 | int i; | 682 | int i; |
681 | 683 | ||
682 | facility_list = stfl(); | ||
683 | /* | 684 | /* |
684 | * The store facility list bits numbers as found in the principles | 685 | * The store facility list bits numbers as found in the principles |
685 | * of operation are numbered with bit 1UL<<31 as number 0 to | 686 | * of operation are numbered with bit 1UL<<31 as number 0 to |
@@ -699,11 +700,10 @@ static void __init setup_hwcaps(void) | |||
699 | * HWCAP_S390_ETF3EH bit 8 (22 && 30). | 700 | * HWCAP_S390_ETF3EH bit 8 (22 && 30). |
700 | */ | 701 | */ |
701 | for (i = 0; i < 6; i++) | 702 | for (i = 0; i < 6; i++) |
702 | if (facility_list & (1UL << (31 - stfl_bits[i]))) | 703 | if (test_facility(stfl_bits[i])) |
703 | elf_hwcap |= 1UL << i; | 704 | elf_hwcap |= 1UL << i; |
704 | 705 | ||
705 | if ((facility_list & (1UL << (31 - 22))) | 706 | if (test_facility(22) && test_facility(30)) |
706 | && (facility_list & (1UL << (31 - 30)))) | ||
707 | elf_hwcap |= HWCAP_S390_ETF3EH; | 707 | elf_hwcap |= HWCAP_S390_ETF3EH; |
708 | 708 | ||
709 | /* | 709 | /* |
@@ -719,12 +719,8 @@ static void __init setup_hwcaps(void) | |||
719 | * translated to: | 719 | * translated to: |
720 | * HWCAP_S390_DFP bit 6 (42 && 44). | 720 | * HWCAP_S390_DFP bit 6 (42 && 44). |
721 | */ | 721 | */ |
722 | if ((elf_hwcap & (1UL << 2)) && | 722 | if ((elf_hwcap & (1UL << 2)) && test_facility(42) && test_facility(44)) |
723 | __stfle(&facility_list_extended, 1) > 0) { | 723 | elf_hwcap |= HWCAP_S390_DFP; |
724 | if ((facility_list_extended & (1ULL << (63 - 42))) | ||
725 | && (facility_list_extended & (1ULL << (63 - 44)))) | ||
726 | elf_hwcap |= HWCAP_S390_DFP; | ||
727 | } | ||
728 | 724 | ||
729 | /* | 725 | /* |
730 | * Huge page support HWCAP_S390_HPAGE is bit 7. | 726 | * Huge page support HWCAP_S390_HPAGE is bit 7. |