diff options
author | Pekka Paalanen <pq@iki.fi> | 2008-05-12 15:20:57 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-05-24 05:22:24 -0400 |
commit | d61fc44853f46fb002228b18aa5f30db21fcd4ac (patch) | |
tree | 14fa9416aeceb7c5d24876c1111f6f2458a1dc7d /arch/x86/kernel/mmiotrace/testmmiotrace.c | |
parent | 0fd0e3da4557c479b820b9a4a7afa25b4637ddf2 (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/kernel/mmiotrace/testmmiotrace.c')
-rw-r--r-- | arch/x86/kernel/mmiotrace/testmmiotrace.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/arch/x86/kernel/mmiotrace/testmmiotrace.c b/arch/x86/kernel/mmiotrace/testmmiotrace.c index 5ecff578672b..cfa60b227c8d 100644 --- a/arch/x86/kernel/mmiotrace/testmmiotrace.c +++ b/arch/x86/kernel/mmiotrace/testmmiotrace.c | |||
@@ -4,10 +4,6 @@ | |||
4 | #include <linux/module.h> | 4 | #include <linux/module.h> |
5 | #include <asm/io.h> | 5 | #include <asm/io.h> |
6 | 6 | ||
7 | extern void __iomem *ioremap_nocache_trace(unsigned long offset, | ||
8 | unsigned long size); | ||
9 | extern void iounmap_trace(volatile void __iomem *addr); | ||
10 | |||
11 | #define MODULE_NAME "testmmiotrace" | 7 | #define MODULE_NAME "testmmiotrace" |
12 | 8 | ||
13 | static unsigned long mmio_address; | 9 | static unsigned long mmio_address; |
@@ -28,25 +24,24 @@ static void do_write_test(void __iomem *p) | |||
28 | static void do_read_test(void __iomem *p) | 24 | static void do_read_test(void __iomem *p) |
29 | { | 25 | { |
30 | unsigned int i; | 26 | unsigned int i; |
31 | volatile unsigned int v; | ||
32 | for (i = 0; i < 256; i++) | 27 | for (i = 0; i < 256; i++) |
33 | v = ioread8(p + i); | 28 | ioread8(p + i); |
34 | for (i = 1024; i < (5 * 1024); i += 2) | 29 | for (i = 1024; i < (5 * 1024); i += 2) |
35 | v = ioread16(p + i); | 30 | ioread16(p + i); |
36 | for (i = (5 * 1024); i < (16 * 1024); i += 4) | 31 | for (i = (5 * 1024); i < (16 * 1024); i += 4) |
37 | v = ioread32(p + i); | 32 | ioread32(p + i); |
38 | } | 33 | } |
39 | 34 | ||
40 | static void do_test(void) | 35 | static void do_test(void) |
41 | { | 36 | { |
42 | void __iomem *p = ioremap_nocache_trace(mmio_address, 0x4000); | 37 | void __iomem *p = ioremap_nocache(mmio_address, 0x4000); |
43 | if (!p) { | 38 | if (!p) { |
44 | pr_err(MODULE_NAME ": could not ioremap, aborting.\n"); | 39 | pr_err(MODULE_NAME ": could not ioremap, aborting.\n"); |
45 | return; | 40 | return; |
46 | } | 41 | } |
47 | do_write_test(p); | 42 | do_write_test(p); |
48 | do_read_test(p); | 43 | do_read_test(p); |
49 | iounmap_trace(p); | 44 | iounmap(p); |
50 | } | 45 | } |
51 | 46 | ||
52 | static int __init init(void) | 47 | static int __init init(void) |