]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/s390/kernel/setup.c
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
[linux-2.6-omap-h63xx.git] / arch / s390 / kernel / setup.c
index 29ae165d174931b0d7b1775e3690c1be23d5c8f9..a9d18aafa5f47f610db88996985270c1bda30f35 100644 (file)
@@ -24,7 +24,6 @@
 #include <linux/ptrace.h>
 #include <linux/slab.h>
 #include <linux/user.h>
-#include <linux/a.out.h>
 #include <linux/tty.h>
 #include <linux/ioport.h>
 #include <linux/delay.h>
@@ -40,6 +39,7 @@
 #include <linux/pfn.h>
 #include <linux/ctype.h>
 #include <linux/reboot.h>
+#include <linux/topology.h>
 
 #include <asm/ipl.h>
 #include <asm/uaccess.h>
@@ -316,7 +316,11 @@ static int __init early_parse_ipldelay(char *p)
 early_param("ipldelay", early_parse_ipldelay);
 
 #ifdef CONFIG_S390_SWITCH_AMODE
+#ifdef CONFIG_PGSTE
+unsigned int switch_amode = 1;
+#else
 unsigned int switch_amode = 0;
+#endif
 EXPORT_SYMBOL_GPL(switch_amode);
 
 static void set_amode_and_uaccess(unsigned long user_amode,
@@ -428,7 +432,7 @@ setup_lowcore(void)
        lc->io_new_psw.mask = psw_kernel_bits;
        lc->io_new_psw.addr = PSW_ADDR_AMODE | (unsigned long) io_int_handler;
        lc->ipl_device = S390_lowcore.ipl_device;
-       lc->jiffy_timer = -1LL;
+       lc->clock_comparator = -1ULL;
        lc->kernel_stack = ((unsigned long) &init_thread_union) + THREAD_SIZE;
        lc->async_stack = (unsigned long)
                __alloc_bootmem(ASYNC_SIZE, ASYNC_SIZE, 0) + ASYNC_SIZE;
@@ -649,21 +653,24 @@ setup_memory(void)
        /*
         * Reserve memory used for lowcore/command line/kernel image.
         */
-       reserve_bootmem(0, (unsigned long)_ehead);
+       reserve_bootmem(0, (unsigned long)_ehead, BOOTMEM_DEFAULT);
        reserve_bootmem((unsigned long)_stext,
-                       PFN_PHYS(start_pfn) - (unsigned long)_stext);
+                       PFN_PHYS(start_pfn) - (unsigned long)_stext,
+                       BOOTMEM_DEFAULT);
        /*
         * Reserve the bootmem bitmap itself as well. We do this in two
         * steps (first step was init_bootmem()) because this catches
         * the (very unlikely) case of us accidentally initializing the
         * bootmem allocator with an invalid RAM area.
         */
-       reserve_bootmem(start_pfn << PAGE_SHIFT, bootmap_size);
+       reserve_bootmem(start_pfn << PAGE_SHIFT, bootmap_size,
+                       BOOTMEM_DEFAULT);
 
 #ifdef CONFIG_BLK_DEV_INITRD
        if (INITRD_START && INITRD_SIZE) {
                if (INITRD_START + INITRD_SIZE <= memory_end) {
-                       reserve_bootmem(INITRD_START, INITRD_SIZE);
+                       reserve_bootmem(INITRD_START, INITRD_SIZE,
+                                       BOOTMEM_DEFAULT);
                        initrd_start = INITRD_START;
                        initrd_end = initrd_start + INITRD_SIZE;
                } else {
@@ -685,7 +692,7 @@ static __init unsigned int stfl(void)
        return S390_lowcore.stfl_fac_list;
 }
 
-static __init int stfle(unsigned long long *list, int doublewords)
+static int __init __stfle(unsigned long long *list, int doublewords)
 {
        typedef struct { unsigned long long _[doublewords]; } addrtype;
        register unsigned long __nr asm("0") = doublewords - 1;
@@ -695,6 +702,13 @@ static __init int stfle(unsigned long long *list, int doublewords)
        return __nr + 1;
 }
 
+int __init stfle(unsigned long long *list, int doublewords)
+{
+       if (!(stfl() & (1UL << 24)))
+               return -EOPNOTSUPP;
+       return __stfle(list, doublewords);
+}
+
 /*
  * Setup hardware capabilities.
  */
@@ -739,7 +753,7 @@ static void __init setup_hwcaps(void)
         *   HWCAP_S390_DFP bit 6.
         */
        if ((elf_hwcap & (1UL << 2)) &&
-           stfle(&facility_list_extended, 1) > 0) {
+           __stfle(&facility_list_extended, 1) > 0) {
                if (facility_list_extended & (1ULL << (64 - 43)))
                        elf_hwcap |= 1UL << 6;
        }
@@ -787,9 +801,13 @@ setup_arch(char **cmdline_p)
               "This machine has an IEEE fpu\n" :
               "This machine has no IEEE fpu\n");
 #else /* CONFIG_64BIT */
-       printk((MACHINE_IS_VM) ?
-              "We are running under VM (64 bit mode)\n" :
-              "We are running native (64 bit mode)\n");
+       if (MACHINE_IS_VM)
+               printk("We are running under VM (64 bit mode)\n");
+       else if (MACHINE_IS_KVM) {
+               printk("We are running under KVM (64 bit mode)\n");
+               add_preferred_console("ttyS", 1, NULL);
+       } else
+               printk("We are running native (64 bit mode)\n");
 #endif /* CONFIG_64BIT */
 
        /* Save unparsed command line copy for /proc/cmdline */
@@ -821,6 +839,7 @@ setup_arch(char **cmdline_p)
 
         cpu_init();
         __cpu_logical_map[0] = S390_lowcore.cpu_data.cpu_addr;
+       s390_init_cpu_topology();
 
        /*
         * Setup capabilities (ELF_HWCAP & ELF_PLATFORM).