diff options
Diffstat (limited to 'drivers/acpi/numa.c')
-rw-r--r-- | drivers/acpi/numa.c | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index 3a0d8ef25c75..d440ccd27d91 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c | |||
@@ -131,6 +131,21 @@ acpi_table_print_srat_entry(struct acpi_subtable_header *header) | |||
131 | #endif /* ACPI_DEBUG_OUTPUT */ | 131 | #endif /* ACPI_DEBUG_OUTPUT */ |
132 | break; | 132 | break; |
133 | 133 | ||
134 | case ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY: | ||
135 | #ifdef ACPI_DEBUG_OUTPUT | ||
136 | { | ||
137 | struct acpi_srat_x2apic_cpu_affinity *p = | ||
138 | (struct acpi_srat_x2apic_cpu_affinity *)header; | ||
139 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | ||
140 | "SRAT Processor (x2apicid[0x%08x]) in" | ||
141 | " proximity domain %d %s\n", | ||
142 | p->apic_id, | ||
143 | p->proximity_domain, | ||
144 | (p->flags & ACPI_SRAT_CPU_ENABLED) ? | ||
145 | "enabled" : "disabled")); | ||
146 | } | ||
147 | #endif /* ACPI_DEBUG_OUTPUT */ | ||
148 | break; | ||
134 | default: | 149 | default: |
135 | printk(KERN_WARNING PREFIX | 150 | printk(KERN_WARNING PREFIX |
136 | "Found unsupported SRAT entry (type = 0x%x)\n", | 151 | "Found unsupported SRAT entry (type = 0x%x)\n", |
@@ -180,8 +195,35 @@ static int __init acpi_parse_slit(struct acpi_table_header *table) | |||
180 | return 0; | 195 | return 0; |
181 | } | 196 | } |
182 | 197 | ||
198 | void __init __attribute__ ((weak)) | ||
199 | acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa) | ||
200 | { | ||
201 | printk(KERN_WARNING PREFIX | ||
202 | "Found unsupported x2apic [0x%08x] SRAT entry\n", pa->apic_id); | ||
203 | return; | ||
204 | } | ||
205 | |||
206 | |||
207 | static int __init | ||
208 | acpi_parse_x2apic_affinity(struct acpi_subtable_header *header, | ||
209 | const unsigned long end) | ||
210 | { | ||
211 | struct acpi_srat_x2apic_cpu_affinity *processor_affinity; | ||
212 | |||
213 | processor_affinity = (struct acpi_srat_x2apic_cpu_affinity *)header; | ||
214 | if (!processor_affinity) | ||
215 | return -EINVAL; | ||
216 | |||
217 | acpi_table_print_srat_entry(header); | ||
218 | |||
219 | /* let architecture-dependent part to do it */ | ||
220 | acpi_numa_x2apic_affinity_init(processor_affinity); | ||
221 | |||
222 | return 0; | ||
223 | } | ||
224 | |||
183 | static int __init | 225 | static int __init |
184 | acpi_parse_processor_affinity(struct acpi_subtable_header * header, | 226 | acpi_parse_processor_affinity(struct acpi_subtable_header *header, |
185 | const unsigned long end) | 227 | const unsigned long end) |
186 | { | 228 | { |
187 | struct acpi_srat_cpu_affinity *processor_affinity; | 229 | struct acpi_srat_cpu_affinity *processor_affinity; |
@@ -241,6 +283,8 @@ int __init acpi_numa_init(void) | |||
241 | { | 283 | { |
242 | /* SRAT: Static Resource Affinity Table */ | 284 | /* SRAT: Static Resource Affinity Table */ |
243 | if (!acpi_table_parse(ACPI_SIG_SRAT, acpi_parse_srat)) { | 285 | if (!acpi_table_parse(ACPI_SIG_SRAT, acpi_parse_srat)) { |
286 | acpi_table_parse_srat(ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY, | ||
287 | acpi_parse_x2apic_affinity, NR_CPUS); | ||
244 | acpi_table_parse_srat(ACPI_SRAT_TYPE_CPU_AFFINITY, | 288 | acpi_table_parse_srat(ACPI_SRAT_TYPE_CPU_AFFINITY, |
245 | acpi_parse_processor_affinity, NR_CPUS); | 289 | acpi_parse_processor_affinity, NR_CPUS); |
246 | acpi_table_parse_srat(ACPI_SRAT_TYPE_MEMORY_AFFINITY, | 290 | acpi_table_parse_srat(ACPI_SRAT_TYPE_MEMORY_AFFINITY, |