aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel/setup.c')
-rw-r--r--arch/s390/kernel/setup.c72
1 files changed, 0 insertions, 72 deletions
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index a5ea8bc17cb3..7262fe438c99 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -92,10 +92,8 @@ EXPORT_SYMBOL(VMALLOC_END);
92struct page *vmemmap; 92struct page *vmemmap;
93EXPORT_SYMBOL(vmemmap); 93EXPORT_SYMBOL(vmemmap);
94 94
95#ifdef CONFIG_64BIT
96unsigned long MODULES_VADDR; 95unsigned long MODULES_VADDR;
97unsigned long MODULES_END; 96unsigned long MODULES_END;
98#endif
99 97
100/* An array with a pointer to the lowcore of every CPU. */ 98/* An array with a pointer to the lowcore of every CPU. */
101struct _lowcore *lowcore_ptr[NR_CPUS]; 99struct _lowcore *lowcore_ptr[NR_CPUS];
@@ -334,19 +332,10 @@ static void __init setup_lowcore(void)
334 lc->stfl_fac_list = S390_lowcore.stfl_fac_list; 332 lc->stfl_fac_list = S390_lowcore.stfl_fac_list;
335 memcpy(lc->stfle_fac_list, S390_lowcore.stfle_fac_list, 333 memcpy(lc->stfle_fac_list, S390_lowcore.stfle_fac_list,
336 MAX_FACILITY_BIT/8); 334 MAX_FACILITY_BIT/8);
337#ifndef CONFIG_64BIT
338 if (MACHINE_HAS_IEEE) {
339 lc->extended_save_area_addr = (__u32)
340 __alloc_bootmem_low(PAGE_SIZE, PAGE_SIZE, 0);
341 /* enable extended save area */
342 __ctl_set_bit(14, 29);
343 }
344#else
345 if (MACHINE_HAS_VX) 335 if (MACHINE_HAS_VX)
346 lc->vector_save_area_addr = 336 lc->vector_save_area_addr =
347 (unsigned long) &lc->vector_save_area; 337 (unsigned long) &lc->vector_save_area;
348 lc->vdso_per_cpu_data = (unsigned long) &lc->paste[0]; 338 lc->vdso_per_cpu_data = (unsigned long) &lc->paste[0];
349#endif
350 lc->sync_enter_timer = S390_lowcore.sync_enter_timer; 339 lc->sync_enter_timer = S390_lowcore.sync_enter_timer;
351 lc->async_enter_timer = S390_lowcore.async_enter_timer; 340 lc->async_enter_timer = S390_lowcore.async_enter_timer;
352 lc->exit_timer = S390_lowcore.exit_timer; 341 lc->exit_timer = S390_lowcore.exit_timer;
@@ -450,7 +439,6 @@ static void __init setup_memory_end(void)
450 unsigned long vmax, vmalloc_size, tmp; 439 unsigned long vmax, vmalloc_size, tmp;
451 440
452 /* Choose kernel address space layout: 2, 3, or 4 levels. */ 441 /* Choose kernel address space layout: 2, 3, or 4 levels. */
453#ifdef CONFIG_64BIT
454 vmalloc_size = VMALLOC_END ?: (128UL << 30) - MODULES_LEN; 442 vmalloc_size = VMALLOC_END ?: (128UL << 30) - MODULES_LEN;
455 tmp = (memory_end ?: max_physmem_end) / PAGE_SIZE; 443 tmp = (memory_end ?: max_physmem_end) / PAGE_SIZE;
456 tmp = tmp * (sizeof(struct page) + PAGE_SIZE); 444 tmp = tmp * (sizeof(struct page) + PAGE_SIZE);
@@ -462,12 +450,6 @@ static void __init setup_memory_end(void)
462 MODULES_END = vmax; 450 MODULES_END = vmax;
463 MODULES_VADDR = MODULES_END - MODULES_LEN; 451 MODULES_VADDR = MODULES_END - MODULES_LEN;
464 VMALLOC_END = MODULES_VADDR; 452 VMALLOC_END = MODULES_VADDR;
465#else
466 vmalloc_size = VMALLOC_END ?: 96UL << 20;
467 vmax = 1UL << 31; /* 2-level kernel page table */
468 /* vmalloc area is at the end of the kernel address space. */
469 VMALLOC_END = vmax;
470#endif
471 VMALLOC_START = vmax - vmalloc_size; 453 VMALLOC_START = vmax - vmalloc_size;
472 454
473 /* Split remaining virtual space between 1:1 mapping & vmemmap array */ 455 /* Split remaining virtual space between 1:1 mapping & vmemmap array */
@@ -754,7 +736,6 @@ static void __init setup_hwcaps(void)
754 if (MACHINE_HAS_HPAGE) 736 if (MACHINE_HAS_HPAGE)
755 elf_hwcap |= HWCAP_S390_HPAGE; 737 elf_hwcap |= HWCAP_S390_HPAGE;
756 738
757#if defined(CONFIG_64BIT)
758 /* 739 /*
759 * 64-bit register support for 31-bit processes 740 * 64-bit register support for 31-bit processes
760 * HWCAP_S390_HIGH_GPRS is bit 9. 741 * HWCAP_S390_HIGH_GPRS is bit 9.
@@ -772,22 +753,15 @@ static void __init setup_hwcaps(void)
772 */ 753 */
773 if (test_facility(129)) 754 if (test_facility(129))
774 elf_hwcap |= HWCAP_S390_VXRS; 755 elf_hwcap |= HWCAP_S390_VXRS;
775#endif
776
777 get_cpu_id(&cpu_id); 756 get_cpu_id(&cpu_id);
778 add_device_randomness(&cpu_id, sizeof(cpu_id)); 757 add_device_randomness(&cpu_id, sizeof(cpu_id));
779 switch (cpu_id.machine) { 758 switch (cpu_id.machine) {
780 case 0x9672: 759 case 0x9672:
781#if !defined(CONFIG_64BIT)
782 default: /* Use "g5" as default for 31 bit kernels. */
783#endif
784 strcpy(elf_platform, "g5"); 760 strcpy(elf_platform, "g5");
785 break; 761 break;
786 case 0x2064: 762 case 0x2064:
787 case 0x2066: 763 case 0x2066:
788#if defined(CONFIG_64BIT)
789 default: /* Use "z900" as default for 64 bit kernels. */ 764 default: /* Use "z900" as default for 64 bit kernels. */
790#endif
791 strcpy(elf_platform, "z900"); 765 strcpy(elf_platform, "z900");
792 break; 766 break;
793 case 0x2084: 767 case 0x2084:
@@ -839,19 +813,6 @@ void __init setup_arch(char **cmdline_p)
839 /* 813 /*
840 * print what head.S has found out about the machine 814 * print what head.S has found out about the machine
841 */ 815 */
842#ifndef CONFIG_64BIT
843 if (MACHINE_IS_VM)
844 pr_info("Linux is running as a z/VM "
845 "guest operating system in 31-bit mode\n");
846 else if (MACHINE_IS_LPAR)
847 pr_info("Linux is running natively in 31-bit mode\n");
848 if (MACHINE_HAS_IEEE)
849 pr_info("The hardware system has IEEE compatible "
850 "floating point units\n");
851 else
852 pr_info("The hardware system has no IEEE compatible "
853 "floating point units\n");
854#else /* CONFIG_64BIT */
855 if (MACHINE_IS_VM) 816 if (MACHINE_IS_VM)
856 pr_info("Linux is running as a z/VM " 817 pr_info("Linux is running as a z/VM "
857 "guest operating system in 64-bit mode\n"); 818 "guest operating system in 64-bit mode\n");
@@ -859,7 +820,6 @@ void __init setup_arch(char **cmdline_p)
859 pr_info("Linux is running under KVM in 64-bit mode\n"); 820 pr_info("Linux is running under KVM in 64-bit mode\n");
860 else if (MACHINE_IS_LPAR) 821 else if (MACHINE_IS_LPAR)
861 pr_info("Linux is running natively in 64-bit mode\n"); 822 pr_info("Linux is running natively in 64-bit mode\n");
862#endif /* CONFIG_64BIT */
863 823
864 /* Have one command line that is parsed and saved in /proc/cmdline */ 824 /* Have one command line that is parsed and saved in /proc/cmdline */
865 /* boot_command_line has been already set up in early.c */ 825 /* boot_command_line has been already set up in early.c */
@@ -930,35 +890,3 @@ void __init setup_arch(char **cmdline_p)
930 /* Add system specific data to the random pool */ 890 /* Add system specific data to the random pool */
931 setup_randomness(); 891 setup_randomness();
932} 892}
933
934#ifdef CONFIG_32BIT
935static int no_removal_warning __initdata;
936
937static int __init parse_no_removal_warning(char *str)
938{
939 no_removal_warning = 1;
940 return 0;
941}
942__setup("no_removal_warning", parse_no_removal_warning);
943
944static int __init removal_warning(void)
945{
946 if (no_removal_warning)
947 return 0;
948 printk(KERN_ALERT "\n\n");
949 printk(KERN_CONT "Warning - you are using a 31 bit kernel!\n\n");
950 printk(KERN_CONT "We plan to remove 31 bit kernel support from the kernel sources in March 2015.\n");
951 printk(KERN_CONT "Currently we assume that nobody is using the 31 bit kernel on old 31 bit\n");
952 printk(KERN_CONT "hardware anymore. If you think that the code should not be removed and also\n");
953 printk(KERN_CONT "future versions of the Linux kernel should be able to run in 31 bit mode\n");
954 printk(KERN_CONT "please let us know. Please write to:\n");
955 printk(KERN_CONT "linux390@de.ibm.com (mail address) and/or\n");
956 printk(KERN_CONT "linux-s390@vger.kernel.org (mailing list).\n\n");
957 printk(KERN_CONT "Thank you!\n\n");
958 printk(KERN_CONT "If this kernel runs on a 64 bit machine you may consider using a 64 bit kernel.\n");
959 printk(KERN_CONT "This message can be disabled with the \"no_removal_warning\" kernel parameter.\n");
960 schedule_timeout_uninterruptible(300 * HZ);
961 return 0;
962}
963early_initcall(removal_warning);
964#endif