aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2011-03-24 18:18:15 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-24 20:49:37 -0400
commitb2b755b5f10eb32fbdc73a9907c07006b17f714b (patch)
tree444c7a93cc6c3dd109a4b23f1f76cdc38cf5eb10 /include
parente285c1746accb80620e511f9c72e9893beeedc0e (diff)
lib, arch: add filter argument to show_mem and fix private implementations
Commit ddd588b5dd55 ("oom: suppress nodes that are not allowed from meminfo on oom kill") moved lib/show_mem.o out of lib/lib.a, which resulted in build warnings on all architectures that implement their own versions of show_mem(): lib/lib.a(show_mem.o): In function `show_mem': show_mem.c:(.text+0x1f4): multiple definition of `show_mem' arch/sparc/mm/built-in.o:(.text+0xd70): first defined here The fix is to remove __show_mem() and add its argument to show_mem() in all implementations to prevent this breakage. Architectures that implement their own show_mem() actually don't do anything with the argument yet, but they could be made to filter nodes that aren't allowed in the current context in the future just like the generic implementation. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Reported-by: James Bottomley <James.Bottomley@hansenpartnership.com> Suggested-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mm.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index f9535b2c9558..7606d7db96c9 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -861,7 +861,7 @@ extern void pagefault_out_of_memory(void);
861#define offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK) 861#define offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK)
862 862
863/* 863/*
864 * Flags passed to __show_mem() and __show_free_areas() to suppress output in 864 * Flags passed to show_mem() and __show_free_areas() to suppress output in
865 * various contexts. 865 * various contexts.
866 */ 866 */
867#define SHOW_MEM_FILTER_NODES (0x0001u) /* filter disallowed nodes */ 867#define SHOW_MEM_FILTER_NODES (0x0001u) /* filter disallowed nodes */
@@ -1360,8 +1360,7 @@ extern void setup_per_zone_wmarks(void);
1360extern void calculate_zone_inactive_ratio(struct zone *zone); 1360extern void calculate_zone_inactive_ratio(struct zone *zone);
1361extern void mem_init(void); 1361extern void mem_init(void);
1362extern void __init mmap_init(void); 1362extern void __init mmap_init(void);
1363extern void show_mem(void); 1363extern void show_mem(unsigned int flags);
1364extern void __show_mem(unsigned int flags);
1365extern void si_meminfo(struct sysinfo * val); 1364extern void si_meminfo(struct sysinfo * val);
1366extern void si_meminfo_node(struct sysinfo *val, int nid); 1365extern void si_meminfo_node(struct sysinfo *val, int nid);
1367extern int after_bootmem; 1366extern int after_bootmem;