/*
* Copyright (C) 1995 Linus Torvalds
* Copyright (C) 2001, 2002 Andi Kleen, SuSE Labs.
+ * Copyright (C) 2008-2009, Red Hat Inc., Ingo Molnar
*/
#include <linux/interrupt.h>
#include <linux/mmiotrace.h>
};
/*
- * (returns 0 if mmiotrace is disabled)
+ * Returns 0 if mmiotrace is disabled, or if the fault is not
+ * handled by mmiotrace:
*/
static inline int kmmio_fault(struct pt_regs *regs, unsigned long addr)
{
if (!(error_code & PF_USER))
no_context(regs, error_code, address);
-#ifdef CONFIG_X86_32
- /* User space => ok to do another page fault: */
+ /* User-space => ok to do another page fault: */
if (is_prefetch(regs, error_code, address))
return;
-#endif
tsk->thread.cr2 = address;
tsk->thread.error_code = error_code;
static int fault_in_kernel_space(unsigned long address)
{
-#ifdef CONFIG_X86_32
- return address >= TASK_SIZE;
-#else
return address >= TASK_SIZE_MAX;
-#endif
}
/*