diff options
Diffstat (limited to 'arch/s390/kernel/setup.c')
-rw-r--r-- | arch/s390/kernel/setup.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index c837bcacf218..c6878fbbcf13 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -80,6 +80,8 @@ EXPORT_SYMBOL(console_irq); | |||
80 | unsigned long elf_hwcap __read_mostly = 0; | 80 | unsigned long elf_hwcap __read_mostly = 0; |
81 | char elf_platform[ELF_PLATFORM_SIZE]; | 81 | char elf_platform[ELF_PLATFORM_SIZE]; |
82 | 82 | ||
83 | unsigned long int_hwcap = 0; | ||
84 | |||
83 | int __initdata memory_end_set; | 85 | int __initdata memory_end_set; |
84 | unsigned long __initdata memory_end; | 86 | unsigned long __initdata memory_end; |
85 | unsigned long __initdata max_physmem_end; | 87 | unsigned long __initdata max_physmem_end; |
@@ -97,7 +99,7 @@ unsigned long MODULES_VADDR; | |||
97 | unsigned long MODULES_END; | 99 | unsigned long MODULES_END; |
98 | 100 | ||
99 | /* An array with a pointer to the lowcore of every CPU. */ | 101 | /* An array with a pointer to the lowcore of every CPU. */ |
100 | struct _lowcore *lowcore_ptr[NR_CPUS]; | 102 | struct lowcore *lowcore_ptr[NR_CPUS]; |
101 | EXPORT_SYMBOL(lowcore_ptr); | 103 | EXPORT_SYMBOL(lowcore_ptr); |
102 | 104 | ||
103 | /* | 105 | /* |
@@ -291,12 +293,12 @@ void *restart_stack __attribute__((__section__(".data"))); | |||
291 | 293 | ||
292 | static void __init setup_lowcore(void) | 294 | static void __init setup_lowcore(void) |
293 | { | 295 | { |
294 | struct _lowcore *lc; | 296 | struct lowcore *lc; |
295 | 297 | ||
296 | /* | 298 | /* |
297 | * Setup lowcore for boot cpu | 299 | * Setup lowcore for boot cpu |
298 | */ | 300 | */ |
299 | BUILD_BUG_ON(sizeof(struct _lowcore) != LC_PAGES * 4096); | 301 | BUILD_BUG_ON(sizeof(struct lowcore) != LC_PAGES * 4096); |
300 | lc = __alloc_bootmem_low(LC_PAGES * PAGE_SIZE, LC_PAGES * PAGE_SIZE, 0); | 302 | lc = __alloc_bootmem_low(LC_PAGES * PAGE_SIZE, LC_PAGES * PAGE_SIZE, 0); |
301 | lc->restart_psw.mask = PSW_KERNEL_BITS; | 303 | lc->restart_psw.mask = PSW_KERNEL_BITS; |
302 | lc->restart_psw.addr = | 304 | lc->restart_psw.addr = |
@@ -661,15 +663,6 @@ static void __init reserve_kernel(void) | |||
661 | #endif | 663 | #endif |
662 | } | 664 | } |
663 | 665 | ||
664 | static void __init reserve_elfcorehdr(void) | ||
665 | { | ||
666 | #ifdef CONFIG_CRASH_DUMP | ||
667 | if (is_kdump_kernel()) | ||
668 | memblock_reserve(elfcorehdr_addr - OLDMEM_BASE, | ||
669 | PAGE_ALIGN(elfcorehdr_size)); | ||
670 | #endif | ||
671 | } | ||
672 | |||
673 | static void __init setup_memory(void) | 666 | static void __init setup_memory(void) |
674 | { | 667 | { |
675 | struct memblock_region *reg; | 668 | struct memblock_region *reg; |
@@ -793,6 +786,13 @@ static int __init setup_hwcaps(void) | |||
793 | strcpy(elf_platform, "z13"); | 786 | strcpy(elf_platform, "z13"); |
794 | break; | 787 | break; |
795 | } | 788 | } |
789 | |||
790 | /* | ||
791 | * Virtualization support HWCAP_INT_SIE is bit 0. | ||
792 | */ | ||
793 | if (sclp.has_sief2) | ||
794 | int_hwcap |= HWCAP_INT_SIE; | ||
795 | |||
796 | return 0; | 796 | return 0; |
797 | } | 797 | } |
798 | arch_initcall(setup_hwcaps); | 798 | arch_initcall(setup_hwcaps); |
@@ -841,6 +841,11 @@ void __init setup_arch(char **cmdline_p) | |||
841 | init_mm.brk = (unsigned long) &_end; | 841 | init_mm.brk = (unsigned long) &_end; |
842 | 842 | ||
843 | parse_early_param(); | 843 | parse_early_param(); |
844 | #ifdef CONFIG_CRASH_DUMP | ||
845 | /* Deactivate elfcorehdr= kernel parameter */ | ||
846 | elfcorehdr_addr = ELFCORE_ADDR_MAX; | ||
847 | #endif | ||
848 | |||
844 | os_info_init(); | 849 | os_info_init(); |
845 | setup_ipl(); | 850 | setup_ipl(); |
846 | 851 | ||
@@ -849,7 +854,6 @@ void __init setup_arch(char **cmdline_p) | |||
849 | reserve_oldmem(); | 854 | reserve_oldmem(); |
850 | reserve_kernel(); | 855 | reserve_kernel(); |
851 | reserve_initrd(); | 856 | reserve_initrd(); |
852 | reserve_elfcorehdr(); | ||
853 | memblock_allow_resize(); | 857 | memblock_allow_resize(); |
854 | 858 | ||
855 | /* Get information about *all* installed memory */ | 859 | /* Get information about *all* installed memory */ |
@@ -870,11 +874,13 @@ void __init setup_arch(char **cmdline_p) | |||
870 | 874 | ||
871 | check_initrd(); | 875 | check_initrd(); |
872 | reserve_crashkernel(); | 876 | reserve_crashkernel(); |
877 | #ifdef CONFIG_CRASH_DUMP | ||
873 | /* | 878 | /* |
874 | * Be aware that smp_save_dump_cpus() triggers a system reset. | 879 | * Be aware that smp_save_dump_cpus() triggers a system reset. |
875 | * Therefore CPU and device initialization should be done afterwards. | 880 | * Therefore CPU and device initialization should be done afterwards. |
876 | */ | 881 | */ |
877 | smp_save_dump_cpus(); | 882 | smp_save_dump_cpus(); |
883 | #endif | ||
878 | 884 | ||
879 | setup_resources(); | 885 | setup_resources(); |
880 | setup_vmcoreinfo(); | 886 | setup_vmcoreinfo(); |