mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
libnvdimm: Set numa_node to NVDIMM devices
ACPI NFIT table has System Physical Address Range Structure entries that describe a proximity ID of each range when ACPI_NFIT_PROXIMITY_VALID is set in the flags. Change acpi_nfit_register_region() to map a proximity ID to its node ID, and set it to a new numa_node field of nd_region_desc, which is then conveyed to the nd_region device. The device core arranges for btt and namespace devices to inherit their node from their parent region. Signed-off-by: Toshi Kani <[email protected]> [djbw: move set_dev_node() from region.c to bus.c] Signed-off-by: Dan Williams <[email protected]>
This commit is contained in:
parent
99759869fa
commit
41d7a6d637
6 changed files with 16 additions and 1 deletions
|
|
@ -1392,6 +1392,12 @@ static int acpi_nfit_register_region(struct acpi_nfit_desc *acpi_desc,
|
|||
ndr_desc->res = &res;
|
||||
ndr_desc->provider_data = nfit_spa;
|
||||
ndr_desc->attr_groups = acpi_nfit_region_attribute_groups;
|
||||
if (spa->flags & ACPI_NFIT_PROXIMITY_VALID)
|
||||
ndr_desc->numa_node = acpi_map_pxm_to_online_node(
|
||||
spa->proximity_domain);
|
||||
else
|
||||
ndr_desc->numa_node = NUMA_NO_NODE;
|
||||
|
||||
list_for_each_entry(nfit_memdev, &acpi_desc->memdevs, list) {
|
||||
struct acpi_nfit_memory_map *memdev = nfit_memdev->memdev;
|
||||
struct nd_mapping *nd_mapping;
|
||||
|
|
|
|||
Loading…
Reference in a new issue