diff options
author | David Rientjes <rientjes@google.com> | 2009-11-18 01:27:32 +0300 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-12-16 09:53:19 +0300 |
commit | b552a8c56db8a74ceffdcbb9269664009a81d536 (patch) | |
tree | 13a92ed5b350ca6678530d3cda3d747c401e45f5 /drivers/acpi | |
parent | 2345baf4a8a0ac2e7e83f932048bb2d8ec1287e7 (diff) | |
download | linux-b552a8c56db8a74ceffdcbb9269664009a81d536.tar.xz |
ACPI: remove NID_INVAL
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.
[akpm@linux-foundation.org: coding-style fixes]
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Reviewed-by: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/numa.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index 202dd0c976a3..90f1884e8a51 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c @@ -28,6 +28,7 @@ #include <linux/types.h> #include <linux/errno.h> #include <linux/acpi.h> +#include <linux/numa.h> #include <acpi/acpi_bus.h> #define PREFIX "ACPI: " @@ -40,14 +41,14 @@ static nodemask_t nodes_found_map = NODE_MASK_NONE; /* maps to convert between proximity domain and logical node ID */ 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] - = { [0 ... MAX_NUMNODES - 1] = PXM_INVAL }; + = { [0 ... MAX_NUMNODES - 1] = PXM_INVAL }; int pxm_to_node(int pxm) { if (pxm < 0) - return NID_INVAL; + return NUMA_NO_NODE; return pxm_to_node_map[pxm]; } @@ -68,9 +69,9 @@ int acpi_map_pxm_to_node(int pxm) { int node = pxm_to_node_map[pxm]; - if (node < 0){ + if (node < 0) { if (nodes_weight(nodes_found_map) >= MAX_NUMNODES) - return NID_INVAL; + return NUMA_NO_NODE; node = first_unset_node(nodes_found_map); __acpi_map_pxm_to_node(pxm, node); node_set(node, nodes_found_map); @@ -79,16 +80,6 @@ int acpi_map_pxm_to_node(int pxm) 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 acpi_table_print_srat_entry(struct acpi_subtable_header *header) { |