From patchwork Tue Nov 17 22:27:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 60800 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nAHMSi3P026855 for ; Tue, 17 Nov 2009 22:28:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756336AbZKQW2o (ORCPT ); Tue, 17 Nov 2009 17:28:44 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756354AbZKQW2o (ORCPT ); Tue, 17 Nov 2009 17:28:44 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:38594 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756336AbZKQW2n (ORCPT ); Tue, 17 Nov 2009 17:28:43 -0500 Received: from imap1.linux-foundation.org (imap1.linux-foundation.org [140.211.169.55]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id nAHMRXbh015100 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 17 Nov 2009 14:27:34 -0800 Received: from localhost.localdomain (localhost [127.0.0.1]) by imap1.linux-foundation.org (8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with ESMTP id nAHMRWXr023288; Tue, 17 Nov 2009 14:27:32 -0800 Message-Id: <200911172227.nAHMRWXr023288@imap1.linux-foundation.org> Subject: [patch 06/12] acpi: remove NID_INVAL To: lenb@kernel.org Cc: linux-acpi@vger.kernel.org, akpm@linux-foundation.org, rientjes@google.com, Lee.Schermerhorn@hp.com, cl@linux-foundation.org, gorcunov@openvz.org From: akpm@linux-foundation.org Date: Tue, 17 Nov 2009 14:27:32 -0800 MIME-Version: 1.0 X-Spam-Status: No, hits=-3.518 required=5 tests=AWL, BAYES_00, OSDL_HEADER_SUBJECT_BRACKETED X-Spam-Checker-Version: SpamAssassin 3.2.4-osdl_revision__1.47__ X-MIMEDefang-Filter: lf$Revision: 1.188 $ X-Scanned-By: MIMEDefang 2.63 on 140.211.169.13 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org diff -puN drivers/acpi/numa.c~acpi-remove-nid_inval drivers/acpi/numa.c --- a/drivers/acpi/numa.c~acpi-remove-nid_inval +++ a/drivers/acpi/numa.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #define PREFIX "ACPI: " @@ -40,14 +41,14 @@ static nodemask_t nodes_found_map = NODE /* 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) {