diff options
Diffstat (limited to 'arch/s390/kernel/setup.c')
-rw-r--r-- | arch/s390/kernel/setup.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 290e504061a3..7141147e6b63 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/pfn.h> | 39 | #include <linux/pfn.h> |
40 | #include <linux/ctype.h> | 40 | #include <linux/ctype.h> |
41 | #include <linux/reboot.h> | 41 | #include <linux/reboot.h> |
42 | #include <linux/topology.h> | ||
42 | 43 | ||
43 | #include <asm/ipl.h> | 44 | #include <asm/ipl.h> |
44 | #include <asm/uaccess.h> | 45 | #include <asm/uaccess.h> |
@@ -427,7 +428,7 @@ setup_lowcore(void) | |||
427 | lc->io_new_psw.mask = psw_kernel_bits; | 428 | lc->io_new_psw.mask = psw_kernel_bits; |
428 | lc->io_new_psw.addr = PSW_ADDR_AMODE | (unsigned long) io_int_handler; | 429 | lc->io_new_psw.addr = PSW_ADDR_AMODE | (unsigned long) io_int_handler; |
429 | lc->ipl_device = S390_lowcore.ipl_device; | 430 | lc->ipl_device = S390_lowcore.ipl_device; |
430 | lc->jiffy_timer = -1LL; | 431 | lc->clock_comparator = -1ULL; |
431 | lc->kernel_stack = ((unsigned long) &init_thread_union) + THREAD_SIZE; | 432 | lc->kernel_stack = ((unsigned long) &init_thread_union) + THREAD_SIZE; |
432 | lc->async_stack = (unsigned long) | 433 | lc->async_stack = (unsigned long) |
433 | __alloc_bootmem(ASYNC_SIZE, ASYNC_SIZE, 0) + ASYNC_SIZE; | 434 | __alloc_bootmem(ASYNC_SIZE, ASYNC_SIZE, 0) + ASYNC_SIZE; |
@@ -687,7 +688,7 @@ static __init unsigned int stfl(void) | |||
687 | return S390_lowcore.stfl_fac_list; | 688 | return S390_lowcore.stfl_fac_list; |
688 | } | 689 | } |
689 | 690 | ||
690 | static __init int stfle(unsigned long long *list, int doublewords) | 691 | static int __init __stfle(unsigned long long *list, int doublewords) |
691 | { | 692 | { |
692 | typedef struct { unsigned long long _[doublewords]; } addrtype; | 693 | typedef struct { unsigned long long _[doublewords]; } addrtype; |
693 | register unsigned long __nr asm("0") = doublewords - 1; | 694 | register unsigned long __nr asm("0") = doublewords - 1; |
@@ -697,6 +698,13 @@ static __init int stfle(unsigned long long *list, int doublewords) | |||
697 | return __nr + 1; | 698 | return __nr + 1; |
698 | } | 699 | } |
699 | 700 | ||
701 | int __init stfle(unsigned long long *list, int doublewords) | ||
702 | { | ||
703 | if (!(stfl() & (1UL << 24))) | ||
704 | return -EOPNOTSUPP; | ||
705 | return __stfle(list, doublewords); | ||
706 | } | ||
707 | |||
700 | /* | 708 | /* |
701 | * Setup hardware capabilities. | 709 | * Setup hardware capabilities. |
702 | */ | 710 | */ |
@@ -741,7 +749,7 @@ static void __init setup_hwcaps(void) | |||
741 | * HWCAP_S390_DFP bit 6. | 749 | * HWCAP_S390_DFP bit 6. |
742 | */ | 750 | */ |
743 | if ((elf_hwcap & (1UL << 2)) && | 751 | if ((elf_hwcap & (1UL << 2)) && |
744 | stfle(&facility_list_extended, 1) > 0) { | 752 | __stfle(&facility_list_extended, 1) > 0) { |
745 | if (facility_list_extended & (1ULL << (64 - 43))) | 753 | if (facility_list_extended & (1ULL << (64 - 43))) |
746 | elf_hwcap |= 1UL << 6; | 754 | elf_hwcap |= 1UL << 6; |
747 | } | 755 | } |
@@ -823,6 +831,7 @@ setup_arch(char **cmdline_p) | |||
823 | 831 | ||
824 | cpu_init(); | 832 | cpu_init(); |
825 | __cpu_logical_map[0] = S390_lowcore.cpu_data.cpu_addr; | 833 | __cpu_logical_map[0] = S390_lowcore.cpu_data.cpu_addr; |
834 | s390_init_cpu_topology(); | ||
826 | 835 | ||
827 | /* | 836 | /* |
828 | * Setup capabilities (ELF_HWCAP & ELF_PLATFORM). | 837 | * Setup capabilities (ELF_HWCAP & ELF_PLATFORM). |