Skip to content

Commit 9378b63

Browse files
aeglIngo Molnar
authored andcommitted
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 <[email protected]> Acked-by: Yinghai Lu <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Wu Fengguang <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Len Brown <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
1 parent fa36e95 commit 9378b63

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/acpi/numa.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -275,23 +275,19 @@ acpi_table_parse_srat(enum acpi_srat_type id,
275275
int __init acpi_numa_init(void)
276276
{
277277
int ret = 0;
278-
int nr_cpu_entries = nr_cpu_ids;
279278

280-
#ifdef CONFIG_X86
281279
/*
282280
* Should not limit number with cpu num that is from NR_CPUS or nr_cpus=
283281
* SRAT cpu entries could have different order with that in MADT.
284282
* So go over all cpu entries in SRAT to get apicid to node mapping.
285283
*/
286-
nr_cpu_entries = MAX_LOCAL_APIC;
287-
#endif
288284

289285
/* SRAT: Static Resource Affinity Table */
290286
if (!acpi_table_parse(ACPI_SIG_SRAT, acpi_parse_srat)) {
291287
acpi_table_parse_srat(ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY,
292-
acpi_parse_x2apic_affinity, nr_cpu_entries);
288+
acpi_parse_x2apic_affinity, 0);
293289
acpi_table_parse_srat(ACPI_SRAT_TYPE_CPU_AFFINITY,
294-
acpi_parse_processor_affinity, nr_cpu_entries);
290+
acpi_parse_processor_affinity, 0);
295291
ret = acpi_table_parse_srat(ACPI_SRAT_TYPE_MEMORY_AFFINITY,
296292
acpi_parse_memory_affinity,
297293
NR_NODE_MEMBLKS);

0 commit comments

Comments
 (0)