[SPARC64]: Simplify TSB insert checks.
[safe/jmp/linux-2.6] / arch / sparc64 / kernel / setup.c
index ca75f3b..0c68a76 100644 (file)
@@ -222,7 +222,6 @@ static struct pt_regs fake_swapper_regs = { { 0, }, 0, 0, 0, 0 };
 
 static void __init per_cpu_patch(void)
 {
-#ifdef CONFIG_SMP
        struct cpuid_patch_entry *p;
        unsigned long ver;
        int is_jbus;
@@ -233,8 +232,8 @@ static void __init per_cpu_patch(void)
        is_jbus = 0;
        if (tlb_type != hypervisor) {
                __asm__ ("rdpr %%ver, %0" : "=r" (ver));
-               is_jbus = ((ver >> 32) == __JALAPENO_ID ||
-                          (ver >> 32) == __SERRANO_ID);
+               is_jbus = ((ver >> 32UL) == __JALAPENO_ID ||
+                          (ver >> 32UL) == __SERRANO_ID);
        }
 
        p = &__cpuid_patch;
@@ -279,7 +278,6 @@ static void __init per_cpu_patch(void)
 
                p++;
        }
-#endif
 }
 
 static void __init sun4v_patch(void)
@@ -381,10 +379,10 @@ void __init setup_arch(char **cmdline_p)
 
        smp_setup_cpu_possible_map();
 
-       paging_init();
-
        /* Get boot processor trap_block[] setup.  */
-       init_cur_cpu_trap();
+       init_cur_cpu_trap(current_thread_info());
+
+       paging_init();
 }
 
 static int __init set_preferred_console(void)
@@ -405,6 +403,12 @@ static int __init set_preferred_console(void)
                serial_console = 2;
        } else if (idev == PROMDEV_IRSC && odev == PROMDEV_ORSC) {
                serial_console = 3;
+       } else if (idev == PROMDEV_IVCONS && odev == PROMDEV_OVCONS) {
+               /* sunhv_console_init() doesn't check the serial_console
+                * value anyways...
+                */
+               serial_console = 4;
+               return add_preferred_console("ttyHV", 0, NULL);
        } else {
                prom_printf("Inconsistent console: "
                            "input %d, output %d\n",