From: Ingo Molnar Date: Mon, 3 Mar 2008 08:37:41 +0000 (+0100) Subject: x86: warn about RAM pages in ioremap() X-Git-Tag: v2.6.26-rc1~1154^2~494 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=ba748d221eb74b849453a94fdf0e1d0566b407d7;p=linux-2.6-omap-h63xx.git x86: warn about RAM pages in ioremap() Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index e5608d38017..3d0a589d92c 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c @@ -149,9 +149,11 @@ static void __iomem *__ioremap(resource_size_t phys_addr, unsigned long size, for (pfn = phys_addr >> PAGE_SHIFT; (pfn << PAGE_SHIFT) < last_addr; pfn++) { - if (page_is_ram(pfn) && pfn_valid(pfn) && - !PageReserved(pfn_to_page(pfn))) + int is_ram = page_is_ram(pfn); + + if (is_ram && pfn_valid(pfn) && !PageReserved(pfn_to_page(pfn))) return NULL; + WARN_ON_ONCE(is_ram); } switch (mode) {