aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/fault.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mm/fault.c')
-rw-r--r--arch/x86/mm/fault.c59
1 files changed, 14 insertions, 45 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 5c6d816f30b4..c6acc6326374 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -3,41 +3,17 @@
3 * Copyright (C) 2001, 2002 Andi Kleen, SuSE Labs. 3 * Copyright (C) 2001, 2002 Andi Kleen, SuSE Labs.
4 * Copyright (C) 2008-2009, Red Hat Inc., Ingo Molnar 4 * Copyright (C) 2008-2009, Red Hat Inc., Ingo Molnar
5 */ 5 */
6#include <linux/interrupt.h> 6#include <linux/magic.h> /* STACK_END_MAGIC */
7#include <linux/mmiotrace.h> 7#include <linux/sched.h> /* test_thread_flag(), ... */
8#include <linux/bootmem.h> 8#include <linux/kdebug.h> /* oops_begin/end, ... */
9#include <linux/compiler.h> 9#include <linux/module.h> /* search_exception_table */
10#include <linux/highmem.h> 10#include <linux/bootmem.h> /* max_low_pfn */
11#include <linux/kprobes.h> 11#include <linux/kprobes.h> /* __kprobes, ... */
12#include <linux/uaccess.h> 12#include <linux/mmiotrace.h> /* kmmio_handler, ... */
13#include <linux/vmalloc.h> 13#include <linux/perf_counter.h> /* perf_swcounter_event */
14#include <linux/vt_kern.h> 14
15#include <linux/signal.h> 15#include <asm/traps.h> /* dotraplinkage, ... */
16#include <linux/kernel.h> 16#include <asm/pgalloc.h> /* pgd_*(), ... */
17#include <linux/ptrace.h>
18#include <linux/string.h>
19#include <linux/module.h>
20#include <linux/kdebug.h>
21#include <linux/errno.h>
22#include <linux/magic.h>
23#include <linux/sched.h>
24#include <linux/types.h>
25#include <linux/init.h>
26#include <linux/mman.h>
27#include <linux/tty.h>
28#include <linux/smp.h>
29#include <linux/mm.h>
30#include <linux/perf_counter.h>
31
32#include <asm-generic/sections.h>
33
34#include <asm/tlbflush.h>
35#include <asm/pgalloc.h>
36#include <asm/segment.h>
37#include <asm/system.h>
38#include <asm/proto.h>
39#include <asm/traps.h>
40#include <asm/desc.h>
41 17
42/* 18/*
43 * Page fault error code bits: 19 * Page fault error code bits:
@@ -226,12 +202,10 @@ static inline pmd_t *vmalloc_sync_one(pgd_t *pgd, unsigned long address)
226 if (!pmd_present(*pmd_k)) 202 if (!pmd_present(*pmd_k))
227 return NULL; 203 return NULL;
228 204
229 if (!pmd_present(*pmd)) { 205 if (!pmd_present(*pmd))
230 set_pmd(pmd, *pmd_k); 206 set_pmd(pmd, *pmd_k);
231 arch_flush_lazy_mmu_mode(); 207 else
232 } else {
233 BUG_ON(pmd_page(*pmd) != pmd_page(*pmd_k)); 208 BUG_ON(pmd_page(*pmd) != pmd_page(*pmd_k));
234 }
235 209
236 return pmd_k; 210 return pmd_k;
237} 211}
@@ -539,8 +513,6 @@ bad:
539static int is_errata93(struct pt_regs *regs, unsigned long address) 513static int is_errata93(struct pt_regs *regs, unsigned long address)
540{ 514{
541#ifdef CONFIG_X86_64 515#ifdef CONFIG_X86_64
542 static int once;
543
544 if (address != regs->ip) 516 if (address != regs->ip)
545 return 0; 517 return 0;
546 518
@@ -550,10 +522,7 @@ static int is_errata93(struct pt_regs *regs, unsigned long address)
550 address |= 0xffffffffUL << 32; 522 address |= 0xffffffffUL << 32;
551 if ((address >= (u64)_stext && address <= (u64)_etext) || 523 if ((address >= (u64)_stext && address <= (u64)_etext) ||
552 (address >= MODULES_VADDR && address <= MODULES_END)) { 524 (address >= MODULES_VADDR && address <= MODULES_END)) {
553 if (!once) { 525 printk_once(errata93_warning);
554 printk(errata93_warning);
555 once = 1;
556 }
557 regs->ip = address; 526 regs->ip = address;
558 return 1; 527 return 1;
559 } 528 }