]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
memblock: Expose some memblock bits for use by x86
authorYinghai Lu <yinghai@kernel.org>
Wed, 28 Jul 2010 05:07:21 +0000 (15:07 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 5 Aug 2010 02:56:27 +0000 (12:56 +1000)
This exposes memblock_debug and associated memblock_dbg() macro,
along with memblock_can_resize so that x86 can use these when
ported to use memblock

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
include/linux/memblock.h
mm/memblock.c

index c8da03eb7ba318c4bb88920d89fef97a361c8548..eed0f9b8e52630b9a50fa5c6af6e96d11c4d87e8 100644 (file)
@@ -39,6 +39,11 @@ struct memblock {
 };
 
 extern struct memblock memblock;
+extern int memblock_debug;
+extern int memblock_can_resize;
+
+#define memblock_dbg(fmt, ...) \
+       if (memblock_debug) printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
 
 extern void __init memblock_init(void);
 extern void __init memblock_analyze(void);
index cc15be29fd0ac44ad0eb5d64e087af6587be7737..5499ab162b9df985e9f0826ee4401648a9113ecf 100644 (file)
@@ -22,7 +22,8 @@
 
 struct memblock memblock;
 
-static int memblock_debug, memblock_can_resize;
+int memblock_debug;
+int memblock_can_resize;
 static struct memblock_region memblock_memory_init_regions[INIT_MEMBLOCK_REGIONS + 1];
 static struct memblock_region memblock_reserved_init_regions[INIT_MEMBLOCK_REGIONS + 1];