aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/io.h
diff options
context:
space:
mode:
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>2010-06-17 23:22:40 -0400
committerH. Peter Anvin <hpa@linux.intel.com>2010-07-09 14:42:03 -0400
commitffa71f33a820d1ab3f2fc5723819ac60fb76080b (patch)
treefb7fb08c43a773f771a49ac765e9330e07d32eef /include/linux/io.h
parentd7a0380dc3e6607d30ccdfc3cfc2ccee0d966716 (diff)
x86, ioremap: Fix incorrect physical address handling in PAE mode
Current x86 ioremap() doesn't handle physical address higher than 32-bit properly in X86_32 PAE mode. When physical address higher than 32-bit is passed to ioremap(), higher 32-bits in physical address is cleared wrongly. Due to this bug, ioremap() can map wrong address to linear address space. In my case, 64-bit MMIO region was assigned to a PCI device (ioat device) on my system. Because of the ioremap()'s bug, wrong physical address (instead of MMIO region) was mapped to linear address space. Because of this, loading ioatdma driver caused unexpected behavior (kernel panic, kernel hangup, ...). Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> LKML-Reference: <4C1AE680.7090408@jp.fujitsu.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'include/linux/io.h')
-rw-r--r--include/linux/io.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/io.h b/include/linux/io.h
index 6c7f0ba0d5fa..7fd2d2138bf3 100644
--- a/include/linux/io.h
+++ b/include/linux/io.h
@@ -29,10 +29,10 @@ void __iowrite64_copy(void __iomem *to, const void *from, size_t count);
29 29
30#ifdef CONFIG_MMU 30#ifdef CONFIG_MMU
31int ioremap_page_range(unsigned long addr, unsigned long end, 31int ioremap_page_range(unsigned long addr, unsigned long end,
32 unsigned long phys_addr, pgprot_t prot); 32 phys_addr_t phys_addr, pgprot_t prot);
33#else 33#else
34static inline int ioremap_page_range(unsigned long addr, unsigned long end, 34static inline int ioremap_page_range(unsigned long addr, unsigned long end,
35 unsigned long phys_addr, pgprot_t prot) 35 phys_addr_t phys_addr, pgprot_t prot)
36{ 36{
37 return 0; 37 return 0;
38} 38}