]> err.no Git - linux-2.6/blobdiff - arch/x86/pci/amd_bus.c
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
[linux-2.6] / arch / x86 / pci / amd_bus.c
index 465b3a6f1c12479f172a44342e6718b93b5bc73f..dbf5323697110709fb365c534e5a26ad1c3ec5f5 100644 (file)
@@ -1,13 +1,13 @@
 #include <linux/init.h>
 #include <linux/pci.h>
+#include <linux/topology.h>
 #include "pci.h"
 
 #ifdef CONFIG_X86_64
-
 #include <asm/pci-direct.h>
 #include <asm/mpspec.h>
 #include <linux/cpumask.h>
-#include <linux/topology.h>
+#endif
 
 /*
  * This discovers the pcibus <-> node mapping on AMD K8.
@@ -18,6 +18,8 @@
 
 #define BUS_NR 256
 
+#ifdef CONFIG_X86_64
+
 static int mp_bus_to_node[BUS_NR];
 
 void set_mp_bus_to_node(int busnum, int node)
@@ -45,7 +47,31 @@ int get_mp_bus_to_node(int busnum)
        return node;
 }
 
-#endif
+#else /* CONFIG_X86_32 */
+
+static unsigned char mp_bus_to_node[BUS_NR];
+
+void set_mp_bus_to_node(int busnum, int node)
+{
+       if (busnum >= 0 &&  busnum < BUS_NR)
+       mp_bus_to_node[busnum] = (unsigned char) node;
+}
+
+int get_mp_bus_to_node(int busnum)
+{
+       int node;
+
+       if (busnum < 0 || busnum > (BUS_NR - 1))
+               return 0;
+       node = mp_bus_to_node[busnum];
+       return node;
+}
+
+#endif /* CONFIG_X86_32 */
+
+#endif /* CONFIG_NUMA */
+
+#ifdef CONFIG_X86_64
 
 /*
  * sub bus (transparent) will use entres from 3 to store extra from root,
@@ -552,7 +578,7 @@ static int __init enable_pci_io_ecs(void)
        /* assume all cpus from fam10h have IO ECS */
         if (boot_cpu_data.x86 < 0x10)
                return 0;
-       on_each_cpu(enable_pci_io_ecs_per_cpu, NULL, 1, 1);
+       on_each_cpu(enable_pci_io_ecs_per_cpu, NULL, 1);
        pci_probe |= PCI_HAS_IO_ECS;
        return 0;
 }