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.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 455f3fe67b42..3f2b8962cbd0 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -35,6 +35,7 @@
35#include <asm/tlbflush.h> 35#include <asm/tlbflush.h>
36#include <asm/proto.h> 36#include <asm/proto.h>
37#include <asm-generic/sections.h> 37#include <asm-generic/sections.h>
38#include <asm/traps.h>
38 39
39/* 40/*
40 * Page fault error code bits 41 * Page fault error code bits
@@ -357,8 +358,6 @@ static int is_errata100(struct pt_regs *regs, unsigned long address)
357 return 0; 358 return 0;
358} 359}
359 360
360void do_invalid_op(struct pt_regs *, unsigned long);
361
362static int is_f00f_bug(struct pt_regs *regs, unsigned long address) 361static int is_f00f_bug(struct pt_regs *regs, unsigned long address)
363{ 362{
364#ifdef CONFIG_X86_F00F_BUG 363#ifdef CONFIG_X86_F00F_BUG
@@ -593,11 +592,6 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code)
593 unsigned long flags; 592 unsigned long flags;
594#endif 593#endif
595 594
596 /*
597 * We can fault from pretty much anywhere, with unknown IRQ state.
598 */
599 trace_hardirqs_fixup();
600
601 tsk = current; 595 tsk = current;
602 mm = tsk->mm; 596 mm = tsk->mm;
603 prefetchw(&mm->mmap_sem); 597 prefetchw(&mm->mmap_sem);
@@ -915,15 +909,15 @@ LIST_HEAD(pgd_list);
915 909
916void vmalloc_sync_all(void) 910void vmalloc_sync_all(void)
917{ 911{
918#ifdef CONFIG_X86_32
919 unsigned long start = VMALLOC_START & PGDIR_MASK;
920 unsigned long address; 912 unsigned long address;
921 913
914#ifdef CONFIG_X86_32
922 if (SHARED_KERNEL_PMD) 915 if (SHARED_KERNEL_PMD)
923 return; 916 return;
924 917
925 BUILD_BUG_ON(TASK_SIZE & ~PGDIR_MASK); 918 for (address = VMALLOC_START & PMD_MASK;
926 for (address = start; address >= TASK_SIZE; address += PGDIR_SIZE) { 919 address >= TASK_SIZE && address < FIXADDR_TOP;
920 address += PMD_SIZE) {
927 unsigned long flags; 921 unsigned long flags;
928 struct page *page; 922 struct page *page;
929 923
@@ -936,10 +930,8 @@ void vmalloc_sync_all(void)
936 spin_unlock_irqrestore(&pgd_lock, flags); 930 spin_unlock_irqrestore(&pgd_lock, flags);
937 } 931 }
938#else /* CONFIG_X86_64 */ 932#else /* CONFIG_X86_64 */
939 unsigned long start = VMALLOC_START & PGDIR_MASK; 933 for (address = VMALLOC_START & PGDIR_MASK; address <= VMALLOC_END;
940 unsigned long address; 934 address += PGDIR_SIZE) {
941
942 for (address = start; address <= VMALLOC_END; address += PGDIR_SIZE) {
943 const pgd_t *pgd_ref = pgd_offset_k(address); 935 const pgd_t *pgd_ref = pgd_offset_k(address);
944 unsigned long flags; 936 unsigned long flags;
945 struct page *page; 937 struct page *page;