aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/numa.c
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2011-01-12 03:50:37 -0500
committerIngo Molnar <mingo@elte.hu>2011-01-12 06:15:09 -0500
commit9378b63ccb32b9c071dab155c96357ad1e52a709 (patch)
tree8b7aead57e925b54643b1b576c67233c9dfb2659 /drivers/acpi/numa.c
parentfa36e956c5027d9a985d555d104d293c0a98d2c3 (diff)
x86, ia64, acpi: Clean up x86-ism in drivers/acpi/numa.c
As pointed out by Linus CONFIG_X86 in drivers/acpi/numa.c is ugly. Builds and boots on ia64 (both normally and with maxcpus=8 to limit the number of cpus). Signed-off-by: Tony Luck <tony.luck@intel.com> Acked-by: Yinghai Lu <yinghai@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Wu Fengguang <fengguang.wu@intel.com> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Len Brown <len.brown@intel.com> LKML-Reference: <4D2D6B5D.4080208@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/acpi/numa.c')
-rw-r--r--drivers/acpi/numa.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
index d9926afec110..5eb25eb3ea48 100644
--- a/drivers/acpi/numa.c
+++ b/drivers/acpi/numa.c
@@ -275,23 +275,19 @@ acpi_table_parse_srat(enum acpi_srat_type id,
275int __init acpi_numa_init(void) 275int __init acpi_numa_init(void)
276{ 276{
277 int ret = 0; 277 int ret = 0;
278 int nr_cpu_entries = nr_cpu_ids;
279 278
280#ifdef CONFIG_X86
281 /* 279 /*
282 * Should not limit number with cpu num that is from NR_CPUS or nr_cpus= 280 * Should not limit number with cpu num that is from NR_CPUS or nr_cpus=
283 * SRAT cpu entries could have different order with that in MADT. 281 * SRAT cpu entries could have different order with that in MADT.
284 * So go over all cpu entries in SRAT to get apicid to node mapping. 282 * So go over all cpu entries in SRAT to get apicid to node mapping.
285 */ 283 */
286 nr_cpu_entries = MAX_LOCAL_APIC;
287#endif
288 284
289 /* SRAT: Static Resource Affinity Table */ 285 /* SRAT: Static Resource Affinity Table */
290 if (!acpi_table_parse(ACPI_SIG_SRAT, acpi_parse_srat)) { 286 if (!acpi_table_parse(ACPI_SIG_SRAT, acpi_parse_srat)) {
291 acpi_table_parse_srat(ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY, 287 acpi_table_parse_srat(ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY,
292 acpi_parse_x2apic_affinity, nr_cpu_entries); 288 acpi_parse_x2apic_affinity, 0);
293 acpi_table_parse_srat(ACPI_SRAT_TYPE_CPU_AFFINITY, 289 acpi_table_parse_srat(ACPI_SRAT_TYPE_CPU_AFFINITY,
294 acpi_parse_processor_affinity, nr_cpu_entries); 290 acpi_parse_processor_affinity, 0);
295 ret = acpi_table_parse_srat(ACPI_SRAT_TYPE_MEMORY_AFFINITY, 291 ret = acpi_table_parse_srat(ACPI_SRAT_TYPE_MEMORY_AFFINITY,
296 acpi_parse_memory_affinity, 292 acpi_parse_memory_affinity,
297 NR_NODE_MEMBLKS); 293 NR_NODE_MEMBLKS);