From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lee Schermerhorn Subject: [PATCH 2/7] numa-add-generic-percpu-var-numa_node_id-implementation-fix2 Date: Mon, 03 May 2010 11:05:11 -0400 Message-ID: <20100503150511.15039.95965.sendpatchset@localhost.localdomain> References: <20100503150455.15039.10178.sendpatchset@localhost.localdomain> Return-path: In-Reply-To: <20100503150455.15039.10178.sendpatchset@localhost.localdomain> Sender: linux-arch-owner@vger.kernel.org List-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-numa@vger.kernel.org Cc: Tejun Heo , Valdis.Kletnieks@vt.edu, Randy Dunlap , Christoph Lameter , eric.whitney@hp.com, Andrew Morton , KAMEZAWA Hiroyuki Incremental patch 2 to numa-add-generic-percpu-var-numa_node_id-implementation.patch in 28apr10 mmotm. Define generic macro to set 'numa_node' for a specified cpu as suggested by Christoph Lameter and seconded by Tejun Heo. Signed-off-by: Lee Schermerhorn include/linux/topology.h | 7 +++++++ 1 file changed, 7 insertions(+) Index: linux-2.6.34-rc5-mmotm-100428-1653/include/linux/topology.h =================================================================== --- linux-2.6.34-rc5-mmotm-100428-1653.orig/include/linux/topology.h +++ linux-2.6.34-rc5-mmotm-100428-1653/include/linux/topology.h @@ -232,6 +232,13 @@ static inline void set_numa_node(int nod } #endif +#ifndef set_cpu_numa_node +static inline void set_cpu_numa_node(int cpu, int node) +{ + per_cpu(numa_node, cpu) = node; +} +#endif + #else /* !CONFIG_USE_PERCPU_NUMA_NODE_ID */ /* Returns the number of the current Node. */