aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/numa.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2009-12-16 14:22:32 -0500
committerLen Brown <len.brown@intel.com>2009-12-16 14:22:32 -0500
commitaa96ce0af8385415a3450bc13e6254a4d6b4a888 (patch)
tree5d255bc416d469b4d2110910586c43fc6474d51e /drivers/acpi/numa.c
parent2900681b25d5a1a1a7b39ab66da3b8c6b1b0b7ad (diff)
parentbf8b4542f92c4d8222941b1cab055fa350ab2fb4 (diff)
Merge branch 'misc-2.6.33' into release
Diffstat (limited to 'drivers/acpi/numa.c')
-rw-r--r--drivers/acpi/numa.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
index 2be2fb66204e..7ad48dfc12db 100644
--- a/drivers/acpi/numa.c
+++ b/drivers/acpi/numa.c
@@ -28,6 +28,7 @@
28#include <linux/types.h> 28#include <linux/types.h>
29#include <linux/errno.h> 29#include <linux/errno.h>
30#include <linux/acpi.h> 30#include <linux/acpi.h>
31#include <linux/numa.h>
31#include <acpi/acpi_bus.h> 32#include <acpi/acpi_bus.h>
32 33
33#define PREFIX "ACPI: " 34#define PREFIX "ACPI: "
@@ -40,14 +41,14 @@ static nodemask_t nodes_found_map = NODE_MASK_NONE;
40 41
41/* maps to convert between proximity domain and logical node ID */ 42/* maps to convert between proximity domain and logical node ID */
42static int pxm_to_node_map[MAX_PXM_DOMAINS] 43static int pxm_to_node_map[MAX_PXM_DOMAINS]
43 = { [0 ... MAX_PXM_DOMAINS - 1] = NID_INVAL }; 44 = { [0 ... MAX_PXM_DOMAINS - 1] = NUMA_NO_NODE };
44static int node_to_pxm_map[MAX_NUMNODES] 45static int node_to_pxm_map[MAX_NUMNODES]
45 = { [0 ... MAX_NUMNODES - 1] = PXM_INVAL }; 46 = { [0 ... MAX_NUMNODES - 1] = PXM_INVAL };
46 47
47int pxm_to_node(int pxm) 48int pxm_to_node(int pxm)
48{ 49{
49 if (pxm < 0) 50 if (pxm < 0)
50 return NID_INVAL; 51 return NUMA_NO_NODE;
51 return pxm_to_node_map[pxm]; 52 return pxm_to_node_map[pxm];
52} 53}
53 54
@@ -68,9 +69,9 @@ int acpi_map_pxm_to_node(int pxm)
68{ 69{
69 int node = pxm_to_node_map[pxm]; 70 int node = pxm_to_node_map[pxm];
70 71
71 if (node < 0){ 72 if (node < 0) {
72 if (nodes_weight(nodes_found_map) >= MAX_NUMNODES) 73 if (nodes_weight(nodes_found_map) >= MAX_NUMNODES)
73 return NID_INVAL; 74 return NUMA_NO_NODE;
74 node = first_unset_node(nodes_found_map); 75 node = first_unset_node(nodes_found_map);
75 __acpi_map_pxm_to_node(pxm, node); 76 __acpi_map_pxm_to_node(pxm, node);
76 node_set(node, nodes_found_map); 77 node_set(node, nodes_found_map);
@@ -79,16 +80,6 @@ int acpi_map_pxm_to_node(int pxm)
79 return node; 80 return node;
80} 81}
81 82
82#if 0
83void __cpuinit acpi_unmap_pxm_to_node(int node)
84{
85 int pxm = node_to_pxm_map[node];
86 pxm_to_node_map[pxm] = NID_INVAL;
87 node_to_pxm_map[node] = PXM_INVAL;
88 node_clear(node, nodes_found_map);
89}
90#endif /* 0 */
91
92static void __init 83static void __init
93acpi_table_print_srat_entry(struct acpi_subtable_header *header) 84acpi_table_print_srat_entry(struct acpi_subtable_header *header)
94{ 85{