]> Pileus Git - ~andy/linux/commitdiff
Merge branch 'linus' into x86/urgent
authorIngo Molnar <mingo@elte.hu>
Mon, 20 Apr 2009 16:08:07 +0000 (18:08 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 20 Apr 2009 16:08:12 +0000 (18:08 +0200)
Merge reason: We need the x86/uv updates from upstream, to queue up
              dependent fix.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Documentation/kernel-parameters.txt
arch/x86/Makefile
arch/x86/kernel/apic/x2apic_uv_x.c
arch/x86/mm/numa_32.c
arch/x86/mm/srat_64.c

index 600cdd72900c868a311e4d642b425612cd9202e1..90b3924071b6c35f69ece1feba26ae9f92c5ab37 100644 (file)
@@ -1620,6 +1620,8 @@ and is between 256 and 4096 characters. It is defined in the file
 
        nowb            [ARM]
 
+       nox2apic        [X86-64,APIC] Do not enable x2APIC mode.
+
        nptcg=          [IA64] Override max number of concurrent global TLB
                        purges which is reported from either PAL_VM_SUMMARY or
                        SAL PALO.
index f05d8c91d9e51ed29b21a6b99588398182879bb2..8c86b72afdc2d39bc8957692e35335ebabae82bc 100644 (file)
@@ -153,7 +153,7 @@ endif
 
 boot := arch/x86/boot
 
-BOOT_TARGETS = bzlilo bzdisk fdimage fdimage144 fdimage288 isoimage install
+BOOT_TARGETS = bzlilo bzdisk fdimage fdimage144 fdimage288 isoimage
 
 PHONY += bzImage $(BOOT_TARGETS)
 
@@ -171,6 +171,10 @@ bzImage: vmlinux
 $(BOOT_TARGETS): vmlinux
        $(Q)$(MAKE) $(build)=$(boot) $@
 
+PHONY += install
+install:
+       $(Q)$(MAKE) $(build)=$(boot) $@
+
 PHONY += vdso_install
 vdso_install:
        $(Q)$(MAKE) $(build)=arch/x86/vdso $@
index de1a50af807b8b72c85a45e62422b5142c6d8899..d6712334ce4bb795b2e29632c8ab547fb6ea5de8 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/timer.h>
 #include <linux/cpu.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <asm/uv/uv_mmrs.h>
 #include <asm/uv/uv_hub.h>
@@ -34,6 +35,17 @@ DEFINE_PER_CPU(int, x2apic_extra_bits);
 
 static enum uv_system_type uv_system_type;
 
+static int early_get_nodeid(void)
+{
+       union uvh_node_id_u node_id;
+       unsigned long *mmr;
+
+       mmr = early_ioremap(UV_LOCAL_MMR_BASE | UVH_NODE_ID, sizeof(*mmr));
+       node_id.v = *mmr;
+       early_iounmap(mmr, sizeof(*mmr));
+       return node_id.s.node_id;
+}
+
 static int uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
 {
        if (!strcmp(oem_id, "SGI")) {
@@ -42,6 +54,8 @@ static int uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
                else if (!strcmp(oem_table_id, "UVX"))
                        uv_system_type = UV_X2APIC;
                else if (!strcmp(oem_table_id, "UVH")) {
+                       __get_cpu_var(x2apic_extra_bits) =
+                               early_get_nodeid() << (UV_APIC_PNODE_SHIFT - 1);
                        uv_system_type = UV_NON_UNIQUE_APIC;
                        return 1;
                }
index 3daefa04ace535f693b07e5700e0470e17ca93b8..d2530062fe003ee6f28127369ae4f22878329765 100644 (file)
@@ -257,7 +257,7 @@ void resume_map_numa_kva(pgd_t *pgd_base)
 }
 #endif
 
-static unsigned long calculate_numa_remap_pages(void)
+static __init unsigned long calculate_numa_remap_pages(void)
 {
        int nid;
        unsigned long size, reserve_pages = 0;
index c7d272b8574cc1e55d9de9f10186dd1da5c75e85..33c5fa57e43d22ce822249e9b918075684b29d44 100644 (file)
@@ -28,6 +28,7 @@ int acpi_numa __initdata;
 static struct acpi_table_slit *acpi_slit;
 
 static nodemask_t nodes_parsed __initdata;
+static nodemask_t cpu_nodes_parsed __initdata;
 static struct bootnode nodes[MAX_NUMNODES] __initdata;
 static struct bootnode nodes_add[MAX_NUMNODES];
 static int found_add_area __initdata;
@@ -141,6 +142,7 @@ acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa)
 
        apic_id = pa->apic_id;
        apicid_to_node[apic_id] = node;
+       node_set(node, cpu_nodes_parsed);
        acpi_numa = 1;
        printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> Node %u\n",
               pxm, apic_id, node);
@@ -174,6 +176,7 @@ acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa)
        else
                apic_id = pa->apic_id;
        apicid_to_node[apic_id] = node;
+       node_set(node, cpu_nodes_parsed);
        acpi_numa = 1;
        printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> Node %u\n",
               pxm, apic_id, node);
@@ -402,7 +405,8 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end)
                return -1;
        }
 
-       node_possible_map = nodes_parsed;
+       /* Account for nodes with cpus and no memory */
+       nodes_or(node_possible_map, nodes_parsed, cpu_nodes_parsed);
 
        /* Finally register nodes */
        for_each_node_mask(i, node_possible_map)