Commit c919160e authored by Ingo Molnar's avatar Ingo Molnar Committed by Linus Torvalds

[PATCH] Fix smp_processor_id() warning in numa_node_id()

The patch below fixes smp_processor_id() warnings that are triggered by
numa_node_id().

All uses of numa_node_id() in mm/mempolicy.c seem to use it as a 'hint'
only, not as a correctness number.  Once a node is established, it's used
in a preemption-safe way.  So the simple fix is to disable the checking for
numa_node_id().  But additional review would be more than welcome, because
this patch turns off the preemption-checking of numa_node_id() permanently.
Tested on amd64.
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 147266ed
...@@ -375,7 +375,7 @@ int lower_zone_protection_sysctl_handler(struct ctl_table *, int, struct file *, ...@@ -375,7 +375,7 @@ int lower_zone_protection_sysctl_handler(struct ctl_table *, int, struct file *,
#include <linux/topology.h> #include <linux/topology.h>
/* Returns the number of the current Node. */ /* Returns the number of the current Node. */
#define numa_node_id() (cpu_to_node(smp_processor_id())) #define numa_node_id() (cpu_to_node(_smp_processor_id()))
#ifndef CONFIG_DISCONTIGMEM #ifndef CONFIG_DISCONTIGMEM
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment