Merge commit 'upstream/master'
[pandora-kernel.git] / arch / x86 / mm / k8topology_64.c
index 1f476e4..41f1b5c 100644 (file)
@@ -22,6 +22,7 @@
 #include <asm/numa.h>
 #include <asm/mpspec.h>
 #include <asm/apic.h>
+#include <asm/k8.h>
 
 static __init int find_northbridge(void)
 {
@@ -56,34 +57,33 @@ static __init void early_get_boot_cpu_id(void)
        /*
         * Find possible boot-time SMP configuration:
         */
+#ifdef CONFIG_X86_MPPARSE
        early_find_smp_config();
+#endif
 #ifdef CONFIG_ACPI
        /*
         * Read APIC information from ACPI tables.
         */
        early_acpi_boot_init();
 #endif
+#ifdef CONFIG_X86_MPPARSE
        /*
         * get boot-time SMP configuration:
         */
        if (smp_found_config)
                early_get_smp_config();
+#endif
        early_init_lapic_mapping();
 }
 
 int __init k8_scan_nodes(unsigned long start, unsigned long end)
 {
+       unsigned numnodes, cores, bits, apicid_base;
        unsigned long prevbase;
        struct bootnode nodes[8];
-       int nodeid, i, nb;
        unsigned char nodeids[8];
-       int found = 0;
-       u32 reg;
-       unsigned numnodes;
-       unsigned cores;
-       unsigned bits;
-       int j;
-       unsigned apicid_base;
+       int i, j, nb, found = 0;
+       u32 nodeid, reg;
 
        if (!early_pci_allowed())
                return -1;
@@ -105,7 +105,6 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end)
        prevbase = 0;
        for (i = 0; i < 8; i++) {
                unsigned long base, limit;
-               u32 nodeid;
 
                base = read_pci_config(0, nb, 1, 0x40 + i*8);
                limit = read_pci_config(0, nb, 1, 0x44 + i*8);
@@ -144,8 +143,8 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end)
                limit |= (1<<24)-1;
                limit++;
 
-               if (limit > end_pfn << PAGE_SHIFT)
-                       limit = end_pfn << PAGE_SHIFT;
+               if (limit > max_pfn << PAGE_SHIFT)
+                       limit = max_pfn << PAGE_SHIFT;
                if (limit <= base)
                        continue;