]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
sgi-xp: replace cpu_to_node() with cpu_to_mem() to support memoryless node
authorJiang Liu <jiang.liu@linux.intel.com>
Wed, 21 Oct 2015 22:02:55 +0000 (09:02 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 21 Oct 2015 22:02:55 +0000 (09:02 +1100)
xpc_create_gru_mq_uv() allocates memory with __GFP_THISNODE flag set,
which may cause permanent memory allocation failure on memoryless node.
So replace cpu_to_node() with cpu_to_mem() to better support memoryless
node.  For node with memory, cpu_to_mem() is the same as cpu_to_node().

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: David Rientjes <rientjes@google.com>
Cc: Mike Galbraith <umgwanakikbuti@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: "Rafael J . Wysocki" <rafael.j.wysocki@intel.com>
Cc: Tang Chen <tangchen@cn.fujitsu.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/misc/sgi-xp/xpc_uv.c

index 340b44d9e8cf7c634685fd2afe84fddfc136d14b..fa0aafebc672fc7722320da4a4716bf542d88dda 100644 (file)
@@ -238,7 +238,7 @@ xpc_create_gru_mq_uv(unsigned int mq_size, int cpu, char *irq_name,
 
        mq->mmr_blade = uv_cpu_to_blade_id(cpu);
 
-       nid = cpu_to_node(cpu);
+       nid = cpu_to_mem(cpu);
        page = __alloc_pages_node(nid,
                                      GFP_KERNEL | __GFP_ZERO | __GFP_THISNODE,
                                      pg_order);