public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch -mm] acpi: remove NID_INVAL
       [not found]     ` <alpine.DEB.1.00.0910081325200.6998@chino.kir.corp.google.com>
@ 2009-10-27 21:44       ` David Rientjes
  2009-10-28 14:53         ` Cyrill Gorcunov
  2009-10-29 18:40         ` Christoph Lameter
  0 siblings, 2 replies; 3+ messages in thread
From: David Rientjes @ 2009-10-27 21:44 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Lee Schermerhorn, linux-mm, linux-kernel, linux-numa, Len Brown,
	Cyrill Gorcunov, Christoph Lameter

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>
Signed-off-by: David Rientjes <rientjes@google.com>
---
 Depends on Lee Schermerhorn's hugetlb patchset in mmotm-10132113.

 drivers/acpi/numa.c |   23 +++++++----------------
 1 files changed, 7 insertions(+), 16 deletions(-)

diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
--- 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: "
@@ -39,15 +40,15 @@ ACPI_MODULE_NAME("numa");
 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 };
+static int pxm_to_node_map[MAX_PXM_DOMAINS]				
+			= { [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)
 {

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch -mm] acpi: remove NID_INVAL
  2009-10-27 21:44       ` [patch -mm] acpi: remove NID_INVAL David Rientjes
@ 2009-10-28 14:53         ` Cyrill Gorcunov
  2009-10-29 18:40         ` Christoph Lameter
  1 sibling, 0 replies; 3+ messages in thread
From: Cyrill Gorcunov @ 2009-10-28 14:53 UTC (permalink / raw)
  To: David Rientjes
  Cc: Andrew Morton, Lee Schermerhorn, linux-mm, linux-kernel,
	linux-numa, Len Brown, Christoph Lameter

[David Rientjes - Tue, Oct 27, 2009 at 02:44:14PM -0700]
| 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>
| Signed-off-by: David Rientjes <rientjes@google.com>
| ---
|  Depends on Lee Schermerhorn's hugetlb patchset in mmotm-10132113.
| 

Thanks David! My Ack if needed.

	-- Cyrill

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch -mm] acpi: remove NID_INVAL
  2009-10-27 21:44       ` [patch -mm] acpi: remove NID_INVAL David Rientjes
  2009-10-28 14:53         ` Cyrill Gorcunov
@ 2009-10-29 18:40         ` Christoph Lameter
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Lameter @ 2009-10-29 18:40 UTC (permalink / raw)
  To: David Rientjes
  Cc: Andrew Morton, Lee Schermerhorn, linux-mm, linux-kernel,
	linux-numa, Len Brown, Cyrill Gorcunov


Reviewed-by: Christoph Lameter <cl@linux-foundation.org>



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-10-29 14:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20091008162454.23192.91832.sendpatchset@localhost.localdomain>
     [not found] ` <20091008162533.23192.71981.sendpatchset@localhost.localdomain>
     [not found]   ` <alpine.DEB.1.10.0910081616040.8030@gentwo.org>
     [not found]     ` <alpine.DEB.1.00.0910081325200.6998@chino.kir.corp.google.com>
2009-10-27 21:44       ` [patch -mm] acpi: remove NID_INVAL David Rientjes
2009-10-28 14:53         ` Cyrill Gorcunov
2009-10-29 18:40         ` Christoph Lameter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox