Pull asus into release branch
[pandora-kernel.git] / arch / ia64 / sn / kernel / setup.c
index a934ad0..a9bed5c 100644 (file)
@@ -348,8 +348,7 @@ sn_scan_pcdp(void)
                        continue;       /* not PCI interconnect */
 
                if (if_pci.translation & PCDP_PCI_TRANS_IOPORT)
-                       vga_console_iobase =
-                               if_pci.ioport_tra | __IA64_UNCACHED_OFFSET;
+                       vga_console_iobase = if_pci.ioport_tra;
 
                if (if_pci.translation & PCDP_PCI_TRANS_MMIO)
                        vga_console_membase =
@@ -397,6 +396,8 @@ void __init sn_setup(char **cmdline_p)
        ia64_sn_set_os_feature(OSF_PCISEGMENT_ENABLE);
        ia64_sn_set_os_feature(OSF_ACPI_ENABLE);
 
+       /* Load the new DSDT and SSDT tables into the global table list. */
+       acpi_table_init();
 
 #if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE)
        /*
@@ -427,7 +428,8 @@ void __init sn_setup(char **cmdline_p)
         *      bus containing the VGA console.
         */
        if (vga_console_iobase) {
-               io_space[0].mmio_base = vga_console_iobase;
+               io_space[0].mmio_base =
+                       (unsigned long) ioremap(vga_console_iobase, 0);
                io_space[0].sparse = 0;
        }
 
@@ -580,7 +582,7 @@ void __cpuinit sn_cpu_init(void)
        int slice;
        int cnode;
        int i;
-       static int wars_have_been_checked;
+       static int wars_have_been_checked, set_cpu0_number;
 
        cpuid = smp_processor_id();
        if (cpuid == 0 && IS_MEDUSA()) {
@@ -605,8 +607,16 @@ void __cpuinit sn_cpu_init(void)
        /*
         * Don't check status. The SAL call is not supported on all PROMs
         * but a failure is harmless.
+        * Architechtuallly, cpu_init is always called twice on cpu 0. We
+        * should set cpu_number on cpu 0 once.
         */
-       (void) ia64_sn_set_cpu_number(cpuid);
+       if (cpuid == 0) {
+               if (!set_cpu0_number) {
+                       (void) ia64_sn_set_cpu_number(cpuid);
+                       set_cpu0_number = 1;
+               }
+       } else
+               (void) ia64_sn_set_cpu_number(cpuid);
 
        /*
         * The boot cpu makes this call again after platform initialization is