diff options
author | Yinghai Lu <yinghai@kernel.org> | 2010-07-28 01:07:21 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-08-04 22:56:27 -0400 |
commit | 5e63cf43af844ed30acc278b38b8c9bc51eba493 (patch) | |
tree | 02706d0ed24d45b94fdc7ac3a823eedd81a82d12 | |
parent | 6d03b885f0926ab5b66e21307d505afcafa6dced (diff) |
memblock: Expose some memblock bits for use by x86
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>
-rw-r--r-- | include/linux/memblock.h | 5 | ||||
-rw-r--r-- | mm/memblock.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/memblock.h b/include/linux/memblock.h index c8da03eb7ba..eed0f9b8e52 100644 --- a/include/linux/memblock.h +++ b/include/linux/memblock.h | |||
@@ -39,6 +39,11 @@ struct memblock { | |||
39 | }; | 39 | }; |
40 | 40 | ||
41 | extern struct memblock memblock; | 41 | extern struct memblock memblock; |
42 | extern int memblock_debug; | ||
43 | extern int memblock_can_resize; | ||
44 | |||
45 | #define memblock_dbg(fmt, ...) \ | ||
46 | if (memblock_debug) printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | ||
42 | 47 | ||
43 | extern void __init memblock_init(void); | 48 | extern void __init memblock_init(void); |
44 | extern void __init memblock_analyze(void); | 49 | extern void __init memblock_analyze(void); |
diff --git a/mm/memblock.c b/mm/memblock.c index cc15be29fd0..5499ab162b9 100644 --- a/mm/memblock.c +++ b/mm/memblock.c | |||
@@ -22,7 +22,8 @@ | |||
22 | 22 | ||
23 | struct memblock memblock; | 23 | struct memblock memblock; |
24 | 24 | ||
25 | static int memblock_debug, memblock_can_resize; | 25 | int memblock_debug; |
26 | int memblock_can_resize; | ||
26 | static struct memblock_region memblock_memory_init_regions[INIT_MEMBLOCK_REGIONS + 1]; | 27 | static struct memblock_region memblock_memory_init_regions[INIT_MEMBLOCK_REGIONS + 1]; |
27 | static struct memblock_region memblock_reserved_init_regions[INIT_MEMBLOCK_REGIONS + 1]; | 28 | static struct memblock_region memblock_reserved_init_regions[INIT_MEMBLOCK_REGIONS + 1]; |
28 | 29 | ||