diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-03-03 03:37:41 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:40:52 -0400 |
commit | ba748d221eb74b849453a94fdf0e1d0566b407d7 (patch) | |
tree | e84fe10f02e839ea55ebe71b7a29ca98eb7844f4 /arch/x86/mm/ioremap.c | |
parent | 320a6b2efceccb652befca0b1c9a92d6e4256ef6 (diff) |
x86: warn about RAM pages in ioremap()
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/ioremap.c')
-rw-r--r-- | arch/x86/mm/ioremap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index e5608d380176..3d0a589d92c4 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, | |||
149 | for (pfn = phys_addr >> PAGE_SHIFT; | 149 | for (pfn = phys_addr >> PAGE_SHIFT; |
150 | (pfn << PAGE_SHIFT) < last_addr; pfn++) { | 150 | (pfn << PAGE_SHIFT) < last_addr; pfn++) { |
151 | 151 | ||
152 | if (page_is_ram(pfn) && pfn_valid(pfn) && | 152 | int is_ram = page_is_ram(pfn); |
153 | !PageReserved(pfn_to_page(pfn))) | 153 | |
154 | if (is_ram && pfn_valid(pfn) && !PageReserved(pfn_to_page(pfn))) | ||
154 | return NULL; | 155 | return NULL; |
156 | WARN_ON_ONCE(is_ram); | ||
155 | } | 157 | } |
156 | 158 | ||
157 | switch (mode) { | 159 | switch (mode) { |