diff options
author | Andrew Morton <akpm@osdl.org> | 2006-10-20 02:29:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-20 13:26:43 -0400 |
commit | 6220ec7844fda2686496013a66b5b9169976b991 (patch) | |
tree | 7274cbe70f0ef3da085e1f74e3605fa8d1cfc777 /mm | |
parent | e51959faa61278c762389802faf8ba1a40676628 (diff) |
[PATCH] highest_possible_node_id() linkage fix
Qooting Adrian:
- net/sunrpc/svc.c uses highest_possible_node_id()
- include/linux/nodemask.h says highest_possible_node_id() is
out-of-line #if MAX_NUMNODES > 1
- the out-of-line highest_possible_node_id() is in lib/cpumask.c
- lib/Makefile: lib-$(CONFIG_SMP) += cpumask.o
CONFIG_ARCH_DISCONTIGMEM_ENABLE=y, CONFIG_SMP=n, CONFIG_SUNRPC=y
-> highest_possible_node_id() is used in net/sunrpc/svc.c
CONFIG_NODES_SHIFT defined and > 0
-> include/linux/numa.h: MAX_NUMNODES > 1
-> compile error
The bug is not present on architectures where ARCH_DISCONTIGMEM_ENABLE
depends on NUMA (but m32r isn't the only affected architecture).
So move the function into page_alloc.c
Cc: Adrian Bunk <bunk@stusta.de>
Cc: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page_alloc.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index afee38f04d84..ebd425c2e2a7 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -3120,3 +3120,19 @@ unsigned long page_to_pfn(struct page *page) | |||
3120 | EXPORT_SYMBOL(pfn_to_page); | 3120 | EXPORT_SYMBOL(pfn_to_page); |
3121 | EXPORT_SYMBOL(page_to_pfn); | 3121 | EXPORT_SYMBOL(page_to_pfn); |
3122 | #endif /* CONFIG_OUT_OF_LINE_PFN_TO_PAGE */ | 3122 | #endif /* CONFIG_OUT_OF_LINE_PFN_TO_PAGE */ |
3123 | |||
3124 | #if MAX_NUMNODES > 1 | ||
3125 | /* | ||
3126 | * Find the highest possible node id. | ||
3127 | */ | ||
3128 | int highest_possible_node_id(void) | ||
3129 | { | ||
3130 | unsigned int node; | ||
3131 | unsigned int highest = 0; | ||
3132 | |||
3133 | for_each_node_mask(node, node_possible_map) | ||
3134 | highest = node; | ||
3135 | return highest; | ||
3136 | } | ||
3137 | EXPORT_SYMBOL(highest_possible_node_id); | ||
3138 | #endif | ||