aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm
diff options
context:
space:
mode:
authorPekka Paalanen <pq@iki.fi>2008-05-12 15:20:57 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-05-24 05:22:24 -0400
commitd61fc44853f46fb002228b18aa5f30db21fcd4ac (patch)
tree14fa9416aeceb7c5d24876c1111f6f2458a1dc7d /arch/x86/mm
parent0fd0e3da4557c479b820b9a4a7afa25b4637ddf2 (diff)
x86: mmiotrace, preview 2
Kconfig.debug, Makefile and testmmiotrace.c style fixes. Use real mutex instead of mutex. Fix failure path in register probe func. kmmio: RCU read-locked over single stepping. Generate mapping id's. Make mmio-mod.c built-in and rewrite its locking. Add debugfs file to enable/disable mmiotracing. kmmio: use irqsave spinlocks. Lots of cleanups in mmio-mod.c Marker file moved from /proc into debugfs. Call mmiotrace entrypoints directly from ioremap.c. Signed-off-by: Pekka Paalanen <pq@iki.fi> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/mm')
-rw-r--r--arch/x86/mm/ioremap.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index 71bb3159031a..8927c878544d 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -12,6 +12,7 @@
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/slab.h> 13#include <linux/slab.h>
14#include <linux/vmalloc.h> 14#include <linux/vmalloc.h>
15#include <linux/mmiotrace.h>
15 16
16#include <asm/cacheflush.h> 17#include <asm/cacheflush.h>
17#include <asm/e820.h> 18#include <asm/e820.h>
@@ -126,6 +127,7 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr,
126 unsigned long new_prot_val; 127 unsigned long new_prot_val;
127 pgprot_t prot; 128 pgprot_t prot;
128 int retval; 129 int retval;
130 void __iomem *ret_addr;
129 131
130 /* Don't allow wraparound or zero size */ 132 /* Don't allow wraparound or zero size */
131 last_addr = phys_addr + size - 1; 133 last_addr = phys_addr + size - 1;
@@ -233,7 +235,10 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr,
233 return NULL; 235 return NULL;
234 } 236 }
235 237
236 return (void __iomem *) (vaddr + offset); 238 ret_addr = (void __iomem *) (vaddr + offset);
239 mmiotrace_ioremap(phys_addr, size, ret_addr);
240
241 return ret_addr;
237} 242}
238 243
239/** 244/**
@@ -325,6 +330,8 @@ void iounmap(volatile void __iomem *addr)
325 addr = (volatile void __iomem *) 330 addr = (volatile void __iomem *)
326 (PAGE_MASK & (unsigned long __force)addr); 331 (PAGE_MASK & (unsigned long __force)addr);
327 332
333 mmiotrace_iounmap(addr);
334
328 /* Use the vm area unlocked, assuming the caller 335 /* Use the vm area unlocked, assuming the caller
329 ensures there isn't another iounmap for the same address 336 ensures there isn't another iounmap for the same address
330 in parallel. Reuse of the virtual address is prevented by 337 in parallel. Reuse of the virtual address is prevented by