Commit 4e16fee0 authored by David Rientjes's avatar David Rientjes Committed by james toy

NUMA_NO_NODE has been exported globally and thus it can replace NID_INVAL

in the acpi code.

Also removes the unused acpi_unmap_pxm_to_node() function.

Cc: Len Brown <lenb@kernel.org>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Reviewed-by: default avatarChristoph Lameter <cl@linux-foundation.org>
Signed-off-by: default avatarDavid Rientjes <rientjes@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 60a21053
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/acpi.h> #include <linux/acpi.h>
#include <linux/numa.h>
#include <acpi/acpi_bus.h> #include <acpi/acpi_bus.h>
#define PREFIX "ACPI: " #define PREFIX "ACPI: "
...@@ -39,15 +40,15 @@ ACPI_MODULE_NAME("numa"); ...@@ -39,15 +40,15 @@ ACPI_MODULE_NAME("numa");
static nodemask_t nodes_found_map = NODE_MASK_NONE; static nodemask_t nodes_found_map = NODE_MASK_NONE;
/* maps to convert between proximity domain and logical node ID */ /* maps to convert between proximity domain and logical node ID */
static int pxm_to_node_map[MAX_PXM_DOMAINS] static int pxm_to_node_map[MAX_PXM_DOMAINS]
= { [0 ... MAX_PXM_DOMAINS - 1] = NID_INVAL }; = { [0 ... MAX_PXM_DOMAINS - 1] = NUMA_NO_NODE };
static int node_to_pxm_map[MAX_NUMNODES] static int node_to_pxm_map[MAX_NUMNODES]
= { [0 ... MAX_NUMNODES - 1] = PXM_INVAL }; = { [0 ... MAX_NUMNODES - 1] = PXM_INVAL };
int pxm_to_node(int pxm) int pxm_to_node(int pxm)
{ {
if (pxm < 0) if (pxm < 0)
return NID_INVAL; return NUMA_NO_NODE;
return pxm_to_node_map[pxm]; return pxm_to_node_map[pxm];
} }
...@@ -68,9 +69,9 @@ int acpi_map_pxm_to_node(int pxm) ...@@ -68,9 +69,9 @@ int acpi_map_pxm_to_node(int pxm)
{ {
int node = pxm_to_node_map[pxm]; int node = pxm_to_node_map[pxm];
if (node < 0){ if (node < 0) {
if (nodes_weight(nodes_found_map) >= MAX_NUMNODES) if (nodes_weight(nodes_found_map) >= MAX_NUMNODES)
return NID_INVAL; return NUMA_NO_NODE;
node = first_unset_node(nodes_found_map); node = first_unset_node(nodes_found_map);
__acpi_map_pxm_to_node(pxm, node); __acpi_map_pxm_to_node(pxm, node);
node_set(node, nodes_found_map); node_set(node, nodes_found_map);
...@@ -79,16 +80,6 @@ int acpi_map_pxm_to_node(int pxm) ...@@ -79,16 +80,6 @@ int acpi_map_pxm_to_node(int pxm)
return node; return node;
} }
#if 0
void __cpuinit acpi_unmap_pxm_to_node(int node)
{
int pxm = node_to_pxm_map[node];
pxm_to_node_map[pxm] = NID_INVAL;
node_to_pxm_map[node] = PXM_INVAL;
node_clear(node, nodes_found_map);
}
#endif /* 0 */
static void __init static void __init
acpi_table_print_srat_entry(struct acpi_subtable_header *header) acpi_table_print_srat_entry(struct acpi_subtable_header *header)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment