Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d690b2afd5a7a02816386aa704c8c0b1aca8d2de
Commit:     d690b2afd5a7a02816386aa704c8c0b1aca8d2de
Parent:     793b24a2dd0d695c748efba7b2295e7f9fdd3139
Author:     Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Wed Jan 30 13:33:47 2008 +0100
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 13:33:47 2008 +0100

    x86: add early_ioremap() leak detection
    
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
---
 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 7f7daf5..b743de8 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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to