summaryrefslogtreecommitdiff
path: root/arch/x86/mm/srat_64.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2009-04-05 01:51:51 -0400
committerLen Brown <len.brown@intel.com>2009-04-05 01:51:51 -0400
commit33526a53600ac887d100e3c9b4be3637ac8ae3a5 (patch)
tree646cb10e5f02bbbd913eafe9dbc1cfa80166f20e /arch/x86/mm/srat_64.c
parent47ae106d3f37e1fd715975eaf8130e20e171cf52 (diff)
parent786c221a37d3931189d9c9421f63dec92f4d698b (diff)
Merge branch 'x2apic' into release
Diffstat (limited to 'arch/x86/mm/srat_64.c')
-rw-r--r--arch/x86/mm/srat_64.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c
index 09737c8af074..13d56f5b1349 100644
--- a/arch/x86/mm/srat_64.c
+++ b/arch/x86/mm/srat_64.c
@@ -115,6 +115,36 @@ void __init acpi_numa_slit_init(struct acpi_table_slit *slit)
reserve_early(phys, phys + length, "ACPI SLIT");
}
+/* Callback for Proximity Domain -> x2APIC mapping */
+void __init
+acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa)
+{
+ int pxm, node;
+ int apic_id;
+
+ if (srat_disabled())
+ return;
+ if (pa->header.length < sizeof(struct acpi_srat_x2apic_cpu_affinity)) {
+ bad_srat();
+ return;
+ }
+ if ((pa->flags & ACPI_SRAT_CPU_ENABLED) == 0)
+ return;
+ pxm = pa->proximity_domain;
+ node = setup_node(pxm);
+ if (node < 0) {
+ printk(KERN_ERR "SRAT: Too many proximity domains %x\n", pxm);
+ bad_srat();
+ return;
+ }
+
+ apic_id = pa->apic_id;
+ apicid_to_node[apic_id] = node;
+ acpi_numa = 1;
+ printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> Node %u\n",
+ pxm, apic_id, node);
+}
+
/* Callback for Proximity Domain -> LAPIC mapping */
void __init
acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa)