]> www.infradead.org Git - users/jedix/linux-maple.git/commit
acpi: Add acpi_map_pxm_to_online_node()
authorToshi Kani <toshi.kani@hp.com>
Fri, 19 Jun 2015 23:14:15 +0000 (17:14 -0600)
committerDan Duval <dan.duval@oracle.com>
Tue, 11 Oct 2016 18:41:54 +0000 (14:41 -0400)
commitf7893867d4e2e5eb38dc554417c8ec0690388e4e
treec6d5a51f096e471ad8b329bbc0f64da426867bbb
parent88051cd188c2a62622321148c0d430a745d728ac
acpi: Add acpi_map_pxm_to_online_node()

Orabug: 22913653

The kernel initializes CPU & memory's NUMA topology from ACPI
SRAT table.  Some other ACPI tables, such as NFIT and DMAR, also
contain proximity IDs for their device's NUMA topology.  This
information can be used to improve performance of these devices.

This patch introduces acpi_map_pxm_to_online_node(), which is
similar to acpi_map_pxm_to_node(), but always returns an online
node.  When the mapped node from a given proximity ID is offline,
it looks up the node distance table and returns the nearest
online node.

ACPI device drivers, which are called after the NUMA initialization
has completed in the kernel, can call this interface to obtain their
device NUMA topology from ACPI tables.  Such drivers do not have to
deal with offline nodes.  A node may be offline when a device
proximity ID is unique, SRAT memory entry does not exist, or NUMA is
disabled, ex. "numa=off" on x86.

This patch also moves the pxm range check from acpi_get_node() to
acpi_map_pxm_to_node().

Signed-off-by: Toshi Kani <toshi.kani@hp.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
(cherry picked from commit 99759869faf15471cfce251bc138848d8af7d162)
Signed-off-by: Dan Duval <dan.duval@oracle.com>
drivers/acpi/numa.c
include/linux/acpi.h