diff options
author | Suresh Siddha <suresh.b.siddha@intel.com> | 2009-03-30 17:55:30 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-04-03 20:08:12 -0400 |
commit | 7237d3de78ff89ec2e18eae5fe962d063024fef5 (patch) | |
tree | 07d0196e9e3122546cc0366c686d363423bfe894 /arch/x86/mm/srat_64.c | |
parent | 8e0ee43bc2c3e19db56a4adaa9a9b04ce885cd84 (diff) |
x86, ACPI: add support for x2apic ACPI extensions
All logical processors with APIC ID values of 255 and greater will have their
APIC reported through Processor X2APIC structure (type-9 entry type) and all
logical processors with APIC ID less than 255 will have their APIC reported
through legacy Processor Local APIC (type-0 entry type) only. This is the
same case even for NMI structure reporting.
The Processor X2APIC Affinity structure provides the association between the
X2APIC ID of a logical processor and the proximity domain to which the logical
processor belongs.
For OSPM, Procssor IDs outside the 0-254 range are to be declared as Device()
objects in the ACPI namespace.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'arch/x86/mm/srat_64.c')
-rw-r--r-- | arch/x86/mm/srat_64.c | 30 |
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) | |||
115 | reserve_early(phys, phys + length, "ACPI SLIT"); | 115 | reserve_early(phys, phys + length, "ACPI SLIT"); |
116 | } | 116 | } |
117 | 117 | ||
118 | /* Callback for Proximity Domain -> x2APIC mapping */ | ||
119 | void __init | ||
120 | acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa) | ||
121 | { | ||
122 | int pxm, node; | ||
123 | int apic_id; | ||
124 | |||
125 | if (srat_disabled()) | ||
126 | return; | ||
127 | if (pa->header.length < sizeof(struct acpi_srat_x2apic_cpu_affinity)) { | ||
128 | bad_srat(); | ||
129 | return; | ||
130 | } | ||
131 | if ((pa->flags & ACPI_SRAT_CPU_ENABLED) == 0) | ||
132 | return; | ||
133 | pxm = pa->proximity_domain; | ||
134 | node = setup_node(pxm); | ||
135 | if (node < 0) { | ||
136 | printk(KERN_ERR "SRAT: Too many proximity domains %x\n", pxm); | ||
137 | bad_srat(); | ||
138 | return; | ||
139 | } | ||
140 | |||
141 | apic_id = pa->apic_id; | ||
142 | apicid_to_node[apic_id] = node; | ||
143 | acpi_numa = 1; | ||
144 | printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> Node %u\n", | ||
145 | pxm, apic_id, node); | ||
146 | } | ||
147 | |||
118 | /* Callback for Proximity Domain -> LAPIC mapping */ | 148 | /* Callback for Proximity Domain -> LAPIC mapping */ |
119 | void __init | 149 | void __init |
120 | acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa) | 150 | acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa) |