Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / arch / ia64 / sn / kernel / setup.c
index 5f2dcba..30988df 100644 (file)
@@ -6,13 +6,14 @@
  * Copyright (C) 1999,2001-2006 Silicon Graphics, Inc. All rights reserved.
  */
 
+#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/kdev_t.h>
 #include <linux/string.h>
-#include <linux/screen_info.h>
+#include <linux/tty.h>
 #include <linux/console.h>
 #include <linux/timex.h>
 #include <linux/sched.h>
@@ -138,7 +139,7 @@ static int __init pxm_to_nasid(int pxm)
        int i;
        int nid;
 
-       nid = pxm_to_node(pxm);
+       nid = pxm_to_nid_map[pxm];
        for (i = 0; i < num_node_memblks; i++) {
                if (node_memblk[i].nid == nid) {
                        return NASID_GET(node_memblk[i].start_paddr);
@@ -457,7 +458,7 @@ void __init sn_setup(char **cmdline_p)
         * support here so we don't have to listen to failed keyboard probe
         * messages.
         */
-       if (is_shub1() && version <= 0x0209 && acpi_kbd_controller_present) {
+       if (version <= 0x0209 && acpi_kbd_controller_present) {
                printk(KERN_INFO "Disabling legacy keyboard support as prom "
                       "is too old and doesn't provide FADT\n");
                acpi_kbd_controller_present = 0;
@@ -565,7 +566,7 @@ static void __init sn_init_pdas(char **cmdline_p)
  * Also sets up a few fields in the nodepda.  Also known as
  * platform_cpu_init() by the ia64 machvec code.
  */
-void __cpuinit sn_cpu_init(void)
+void __init sn_cpu_init(void)
 {
        int cpuid;
        int cpuphyid;
@@ -576,8 +577,7 @@ void __cpuinit sn_cpu_init(void)
        int i;
        static int wars_have_been_checked;
 
-       cpuid = smp_processor_id();
-       if (cpuid == 0 && IS_MEDUSA()) {
+       if (smp_processor_id() == 0 && IS_MEDUSA()) {
                if (ia64_sn_is_fake_prom())
                        sn_prom_type = 2;
                else
@@ -596,12 +596,6 @@ void __cpuinit sn_cpu_init(void)
                BUG();
        sn_hub_info->as_shift = sn_hub_info->nasid_shift - 2;
 
-       /*
-        * Don't check status. The SAL call is not supported on all PROMs
-        * but a failure is harmless.
-        */
-       (void) ia64_sn_set_cpu_number(cpuid);
-
        /*
         * The boot cpu makes this call again after platform initialization is
         * complete.
@@ -613,6 +607,7 @@ void __cpuinit sn_cpu_init(void)
                if (ia64_sn_get_prom_feature_set(i, &sn_prom_features[i]) != 0)
                        break;
 
+       cpuid = smp_processor_id();
        cpuphyid = get_sapicid();
 
        if (ia64_sn_get_sapic_info(cpuphyid, &nasid, &subnode, &slice))
@@ -709,7 +704,7 @@ void __init build_cnode_tables(void)
         * cnode == node for all C & M bricks.
         */
        for_each_online_node(node) {
-               nasid = pxm_to_nasid(node_to_pxm(node));
+               nasid = pxm_to_nasid(nid_to_pxm_map[node]);
                sn_cnodeid_to_nasid[node] = nasid;
                physical_node_map[nasid] = node;
        }