diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-01-30 13:33:47 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 13:33:47 +0100 |
commit | d690b2afd5a7a02816386aa704c8c0b1aca8d2de (patch) | |
tree | 4a8951a6c43781440236ea3e5f1dba8e75729d08 /arch/x86/mm | |
parent | 793b24a2dd0d695c748efba7b2295e7f9fdd3139 (diff) |
x86: add early_ioremap() leak detection
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/mm')
-rw-r--r-- | arch/x86/mm/ioremap_32.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/x86/mm/ioremap_32.c b/arch/x86/mm/ioremap_32.c index 7f7daf50efe..b743de841f6 100644 --- a/arch/x86/mm/ioremap_32.c +++ b/arch/x86/mm/ioremap_32.c @@ -311,6 +311,22 @@ static inline void __init early_clear_fixmap(enum fixed_addresses idx) int __initdata early_ioremap_nested; +static int __init check_early_ioremap_leak(void) +{ + if (!early_ioremap_nested) + return 0; + + printk(KERN_WARNING + "Debug warning: early ioremap leak of %d areas detected.\n", + early_ioremap_nested); + printk(KERN_WARNING + "please boot with early_ioremap_debug and report the dmesg.\n"); + WARN_ON(1); + + return 1; +} +late_initcall(check_early_ioremap_leak); + void __init *early_ioremap(unsigned long phys_addr, unsigned long size) { unsigned long offset, last_addr; |