aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/fault.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-02-20 16:32:10 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-20 18:09:42 -0500
commitb814d41f0987c7648d7ed07471258101c95c026b (patch)
tree860a824d96dbb128d5038a93103370afbdf00b08 /arch/x86/mm/fault.c
parent121d5d0a7e5808fbcfda484efd7ba840ac93450f (diff)
x86, mm: fault.c, simplify kmmio_fault()
Impact: cleanup Remove an #ifdef from kmmio_fault() - we can do this by providing default implementations for is_kmmio_active() and kmmio_handler(). The compiler optimizes it all away in the !CONFIG_MMIOTRACE case. Also, while at it, clean up mmiotrace.h a bit: - standard header guards - standard vertical spaces for structure definitions No code changed (both with mmiotrace on and off in the config): text data bss dec hex filename 2947 12 12 2971 b9b fault.o.before 2947 12 12 2971 b9b fault.o.after Cc: Pekka Paalanen <pq@iki.fi> Cc: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/fault.c')
-rw-r--r--arch/x86/mm/fault.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 3e3661462739..fe99af4b86d9 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -55,13 +55,14 @@ enum x86_pf_error_code {
55 PF_INSTR = 1 << 4, 55 PF_INSTR = 1 << 4,
56}; 56};
57 57
58/*
59 * (returns 0 if mmiotrace is disabled)
60 */
58static inline int kmmio_fault(struct pt_regs *regs, unsigned long addr) 61static inline int kmmio_fault(struct pt_regs *regs, unsigned long addr)
59{ 62{
60#ifdef CONFIG_MMIOTRACE
61 if (unlikely(is_kmmio_active())) 63 if (unlikely(is_kmmio_active()))
62 if (kmmio_handler(regs, addr) == 1) 64 if (kmmio_handler(regs, addr) == 1)
63 return -1; 65 return -1;
64#endif
65 return 0; 66 return 0;
66} 67}
67 68