aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/ioremap.c
diff options
context:
space:
mode:
authorPekka Paalanen <pq@iki.fi>2008-05-12 15:21:03 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-05-24 05:27:32 -0400
commit87e547fe41a8b57d6d80afc67a0031fbe477eb0d (patch)
tree96b34f7c11268ebb58a470faf858132a69b82639 /arch/x86/mm/ioremap.c
parent970e6fa03885f32cc43e42cb08c73a5f54cd8bd9 (diff)
x86 mmiotrace: fix page-unaligned ioremaps
mmiotrace_ioremap() expects to receive the original unaligned map phys address and size. Also fix {un,}register_kmmio_probe() to deal properly with unaligned size. Signed-off-by: Pekka Paalanen <pq@iki.fi> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/ioremap.c')
-rw-r--r--arch/x86/mm/ioremap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index 8927c878544d..a7c80a6e8622 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -123,6 +123,8 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr,
123{ 123{
124 unsigned long pfn, offset, vaddr; 124 unsigned long pfn, offset, vaddr;
125 resource_size_t last_addr; 125 resource_size_t last_addr;
126 const resource_size_t unaligned_phys_addr = phys_addr;
127 const unsigned long unaligned_size = size;
126 struct vm_struct *area; 128 struct vm_struct *area;
127 unsigned long new_prot_val; 129 unsigned long new_prot_val;
128 pgprot_t prot; 130 pgprot_t prot;
@@ -236,7 +238,7 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr,
236 } 238 }
237 239
238 ret_addr = (void __iomem *) (vaddr + offset); 240 ret_addr = (void __iomem *) (vaddr + offset);
239 mmiotrace_ioremap(phys_addr, size, ret_addr); 241 mmiotrace_ioremap(unaligned_phys_addr, unaligned_size, ret_addr);
240 242
241 return ret_addr; 243 return ret_addr;
242} 244}