]> err.no Git - linux-2.6/blobdiff - arch/ia64/sn/kernel/setup.c
[IA64-SGI] altix: enable vgacon support
[linux-2.6] / arch / ia64 / sn / kernel / setup.c
index fea71ee891eb13c925274adf06d76fd8071ce15f..3e5ba34ac2efb2607220114253b9b8350e99d9d8 100644 (file)
@@ -36,6 +36,7 @@
 #include <asm/machvec.h>
 #include <asm/system.h>
 #include <asm/processor.h>
+#include <asm/vga.h>
 #include <asm/sn/arch.h>
 #include <asm/sn/addrs.h>
 #include <asm/sn/pda.h>
@@ -76,6 +77,9 @@ EXPORT_PER_CPU_SYMBOL(__sn_hub_info);
 DEFINE_PER_CPU(short, __sn_cnodeid_to_nasid[MAX_NUMNODES]);
 EXPORT_PER_CPU_SYMBOL(__sn_cnodeid_to_nasid);
 
+DEFINE_PER_CPU(struct nodepda_s *, __sn_nodepda);
+EXPORT_PER_CPU_SYMBOL(__sn_nodepda);
+
 partid_t sn_partid = -1;
 EXPORT_SYMBOL(sn_partid);
 char sn_system_serial_number_string[128];
@@ -219,7 +223,7 @@ void __init early_sn_setup(void)
 
 extern int platform_intr_list[];
 extern nasid_t master_nasid;
-static int shub_1_1_found __initdata;
+static int __initdata shub_1_1_found = 0;
 
 /*
  * sn_check_for_wars
@@ -248,7 +252,7 @@ static void __init sn_check_for_wars(void)
        } else {
                for_each_online_node(cnode) {
                        if (is_shub_1_1(cnodeid_to_nasid(cnode)))
-                               sn_hub_info->shub_1_1_found = 1;
+                               shub_1_1_found = 1;
                }
        }
 }
@@ -268,14 +272,19 @@ void __init sn_setup(char **cmdline_p)
        int major = sn_sal_rev_major(), minor = sn_sal_rev_minor();
        extern void sn_cpu_init(void);
 
+       ia64_sn_plat_set_error_handling_features();
+
+#if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE)
        /*
-        * If the generic code has enabled vga console support - lets
-        * get rid of it again. This is a kludge for the fact that ACPI
-        * currtently has no way of informing us if legacy VGA is available
-        * or not.
+        * If there was a primary vga adapter identified through the
+        * EFI PCDP table, make it the preferred console.  Otherwise
+        * zero out conswitchp.
         */
-#if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE)
-       if (conswitchp == &vga_con) {
+
+       if (vga_console_membase) {
+               /* usable vga ... make tty0 the preferred default console */
+               add_preferred_console("tty", 0, NULL);
+       } else {
                printk(KERN_DEBUG "SGI: Disabling VGA console\n");
 #ifdef CONFIG_DUMMY_CONSOLE
                conswitchp = &dummy_con;
@@ -480,7 +489,8 @@ void __init sn_cpu_init(void)
 
        cnode = nasid_to_cnodeid(nasid);
 
-       pda->p_nodepda = nodepdaindr[cnode];
+       sn_nodepda = nodepdaindr[cnode];
+
        pda->led_address =
            (typeof(pda->led_address)) (LED0 + (slice << LED_CPU_SHIFT));
        pda->led_state = LED_ALWAYS_SET;
@@ -626,7 +636,8 @@ nasid_slice_to_cpuid(int nasid, int slice)
        long cpu;
        
        for (cpu=0; cpu < NR_CPUS; cpu++) 
-               if (nodepda->phys_cpuid[cpu].nasid == nasid && nodepda->phys_cpuid[cpu].slice == slice)
+               if (cpuid_to_nasid(cpu) == nasid &&
+                                       cpuid_to_slice(cpu) == slice)
                        return cpu;
 
        return -1;