Skip to content

Commit

Permalink
memblock: Expose some memblock bits for use by x86
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yinghai Lu authored and Benjamin Herrenschmidt committed Aug 5, 2010
1 parent 6d03b88 commit 5e63cf4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions include/linux/memblock.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion mm/memblock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down

0 comments on commit 5e63cf4

Please sign in to comment.