aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/ioremap_32.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-01-30 07:33:47 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:33:47 -0500
commitd690b2afd5a7a02816386aa704c8c0b1aca8d2de (patch)
tree4a8951a6c43781440236ea3e5f1dba8e75729d08 /arch/x86/mm/ioremap_32.c
parent793b24a2dd0d695c748efba7b2295e7f9fdd3139 (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/ioremap_32.c')
-rw-r--r--arch/x86/mm/ioremap_32.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/x86/mm/ioremap_32.c b/arch/x86/mm/ioremap_32.c
index 7f7daf50efed..b743de841f68 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)
311 311
312int __initdata early_ioremap_nested; 312int __initdata early_ioremap_nested;
313 313
314static int __init check_early_ioremap_leak(void)
315{
316 if (!early_ioremap_nested)
317 return 0;
318
319 printk(KERN_WARNING
320 "Debug warning: early ioremap leak of %d areas detected.\n",
321 early_ioremap_nested);
322 printk(KERN_WARNING
323 "please boot with early_ioremap_debug and report the dmesg.\n");
324 WARN_ON(1);
325
326 return 1;
327}
328late_initcall(check_early_ioremap_leak);
329
314void __init *early_ioremap(unsigned long phys_addr, unsigned long size) 330void __init *early_ioremap(unsigned long phys_addr, unsigned long size)
315{ 331{
316 unsigned long offset, last_addr; 332 unsigned long offset, last_addr;