Commit d690b2af authored by Ingo Molnar's avatar Ingo Molnar

x86: add early_ioremap() leak detection

Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 793b24a2
...@@ -311,6 +311,22 @@ static inline void __init early_clear_fixmap(enum fixed_addresses idx) ...@@ -311,6 +311,22 @@ static inline void __init early_clear_fixmap(enum fixed_addresses idx)
int __initdata early_ioremap_nested; 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) void __init *early_ioremap(unsigned long phys_addr, unsigned long size)
{ {
unsigned long offset, last_addr; unsigned long offset, last_addr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment