ACPI: Rename acpi_map_pxm_to_online_node() to pxm_to_online_node()
As this function is no longer allowed to create new mappings let us rename it to reflect this. Note all nodes should already exist before any of the users of this function are called. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Hanjun Guo <guohanjun@huawei.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
fe205d984e
commit
4eb3723f18
|
@ -3006,8 +3006,7 @@ static int acpi_nfit_register_region(struct acpi_nfit_desc *acpi_desc,
|
||||||
ndr_desc->provider_data = nfit_spa;
|
ndr_desc->provider_data = nfit_spa;
|
||||||
ndr_desc->attr_groups = acpi_nfit_region_attribute_groups;
|
ndr_desc->attr_groups = acpi_nfit_region_attribute_groups;
|
||||||
if (spa->flags & ACPI_NFIT_PROXIMITY_VALID) {
|
if (spa->flags & ACPI_NFIT_PROXIMITY_VALID) {
|
||||||
ndr_desc->numa_node = acpi_map_pxm_to_online_node(
|
ndr_desc->numa_node = pxm_to_online_node(spa->proximity_domain);
|
||||||
spa->proximity_domain);
|
|
||||||
ndr_desc->target_node = pxm_to_node(spa->proximity_domain);
|
ndr_desc->target_node = pxm_to_node(spa->proximity_domain);
|
||||||
} else {
|
} else {
|
||||||
ndr_desc->numa_node = NUMA_NO_NODE;
|
ndr_desc->numa_node = NUMA_NO_NODE;
|
||||||
|
|
|
@ -664,7 +664,7 @@ static void hmat_register_target_device(struct memory_target *target,
|
||||||
goto out_pdev;
|
goto out_pdev;
|
||||||
}
|
}
|
||||||
|
|
||||||
pdev->dev.numa_node = acpi_map_pxm_to_online_node(target->memory_pxm);
|
pdev->dev.numa_node = pxm_to_online_node(target->memory_pxm);
|
||||||
info = (struct memregion_info) {
|
info = (struct memregion_info) {
|
||||||
.target_node = pxm_to_node(target->memory_pxm),
|
.target_node = pxm_to_node(target->memory_pxm),
|
||||||
};
|
};
|
||||||
|
|
|
@ -420,10 +420,10 @@ int acpi_map_pxm_to_node(int pxm);
|
||||||
int acpi_get_node(acpi_handle handle);
|
int acpi_get_node(acpi_handle handle);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* acpi_map_pxm_to_online_node - Map proximity ID to online node
|
* pxm_to_online_node - Map proximity ID to online node
|
||||||
* @pxm: ACPI proximity ID
|
* @pxm: ACPI proximity ID
|
||||||
*
|
*
|
||||||
* This is similar to acpi_map_pxm_to_node(), but always returns an online
|
* This is similar to pxm_to_node(), but always returns an online
|
||||||
* node. When the mapped node from a given proximity ID is offline, it
|
* 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.
|
* looks up the node distance table and returns the nearest online node.
|
||||||
*
|
*
|
||||||
|
@ -433,14 +433,14 @@ int acpi_get_node(acpi_handle handle);
|
||||||
* offline nodes. A node may be offline when SRAT memory entry does not exist,
|
* offline nodes. A node may be offline when SRAT memory entry does not exist,
|
||||||
* or NUMA is disabled, ex. "numa=off" on x86.
|
* or NUMA is disabled, ex. "numa=off" on x86.
|
||||||
*/
|
*/
|
||||||
static inline int acpi_map_pxm_to_online_node(int pxm)
|
static inline int pxm_to_online_node(int pxm)
|
||||||
{
|
{
|
||||||
int node = pxm_to_node(pxm);
|
int node = pxm_to_node(pxm);
|
||||||
|
|
||||||
return numa_map_to_online_node(node);
|
return numa_map_to_online_node(node);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static inline int acpi_map_pxm_to_online_node(int pxm)
|
static inline int pxm_to_online_node(int pxm)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue