diff options
Diffstat (limited to 'arch/x86/kernel/apic/numaq_32.c')
-rw-r--r-- | arch/x86/kernel/apic/numaq_32.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/x86/kernel/apic/numaq_32.c b/arch/x86/kernel/apic/numaq_32.c index f1a8b120c49d..6273eee5134b 100644 --- a/arch/x86/kernel/apic/numaq_32.c +++ b/arch/x86/kernel/apic/numaq_32.c | |||
@@ -391,6 +391,15 @@ static inline int numaq_apicid_to_node(int logical_apicid) | |||
391 | return logical_apicid >> 4; | 391 | return logical_apicid >> 4; |
392 | } | 392 | } |
393 | 393 | ||
394 | static int numaq_numa_cpu_node(int cpu) | ||
395 | { | ||
396 | int logical_apicid = early_per_cpu(x86_cpu_to_logical_apicid, cpu); | ||
397 | |||
398 | if (logical_apicid != BAD_APICID) | ||
399 | return numaq_apicid_to_node(logical_apicid); | ||
400 | return NUMA_NO_NODE; | ||
401 | } | ||
402 | |||
394 | static void numaq_apicid_to_cpu_present(int logical_apicid, physid_mask_t *retmap) | 403 | static void numaq_apicid_to_cpu_present(int logical_apicid, physid_mask_t *retmap) |
395 | { | 404 | { |
396 | int node = numaq_apicid_to_node(logical_apicid); | 405 | int node = numaq_apicid_to_node(logical_apicid); |
@@ -501,7 +510,6 @@ struct apic __refdata apic_numaq = { | |||
501 | .ioapic_phys_id_map = numaq_ioapic_phys_id_map, | 510 | .ioapic_phys_id_map = numaq_ioapic_phys_id_map, |
502 | .setup_apic_routing = numaq_setup_apic_routing, | 511 | .setup_apic_routing = numaq_setup_apic_routing, |
503 | .multi_timer_check = numaq_multi_timer_check, | 512 | .multi_timer_check = numaq_multi_timer_check, |
504 | .apicid_to_node = numaq_apicid_to_node, | ||
505 | .cpu_present_to_apicid = numaq_cpu_present_to_apicid, | 513 | .cpu_present_to_apicid = numaq_cpu_present_to_apicid, |
506 | .apicid_to_cpu_present = numaq_apicid_to_cpu_present, | 514 | .apicid_to_cpu_present = numaq_apicid_to_cpu_present, |
507 | .setup_portio_remap = numaq_setup_portio_remap, | 515 | .setup_portio_remap = numaq_setup_portio_remap, |
@@ -541,4 +549,5 @@ struct apic __refdata apic_numaq = { | |||
541 | .safe_wait_icr_idle = native_safe_apic_wait_icr_idle, | 549 | .safe_wait_icr_idle = native_safe_apic_wait_icr_idle, |
542 | 550 | ||
543 | .x86_32_early_logical_apicid = noop_x86_32_early_logical_apicid, | 551 | .x86_32_early_logical_apicid = noop_x86_32_early_logical_apicid, |
552 | .x86_32_numa_cpu_node = numaq_numa_cpu_node, | ||
544 | }; | 553 | }; |