diff options
Diffstat (limited to 'arch/x86/mm/fault.c')
-rw-r--r-- | arch/x86/mm/fault.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index 455f3fe67b42..a742d753d5b0 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 | ||
360 | void do_invalid_op(struct pt_regs *, unsigned long); | ||
361 | |||
362 | static int is_f00f_bug(struct pt_regs *regs, unsigned long address) | 361 | static 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 |
@@ -915,15 +914,15 @@ LIST_HEAD(pgd_list); | |||
915 | 914 | ||
916 | void vmalloc_sync_all(void) | 915 | void vmalloc_sync_all(void) |
917 | { | 916 | { |
918 | #ifdef CONFIG_X86_32 | ||
919 | unsigned long start = VMALLOC_START & PGDIR_MASK; | ||
920 | unsigned long address; | 917 | unsigned long address; |
921 | 918 | ||
919 | #ifdef CONFIG_X86_32 | ||
922 | if (SHARED_KERNEL_PMD) | 920 | if (SHARED_KERNEL_PMD) |
923 | return; | 921 | return; |
924 | 922 | ||
925 | BUILD_BUG_ON(TASK_SIZE & ~PGDIR_MASK); | 923 | for (address = VMALLOC_START & PMD_MASK; |
926 | for (address = start; address >= TASK_SIZE; address += PGDIR_SIZE) { | 924 | address >= TASK_SIZE && address < FIXADDR_TOP; |
925 | address += PMD_SIZE) { | ||
927 | unsigned long flags; | 926 | unsigned long flags; |
928 | struct page *page; | 927 | struct page *page; |
929 | 928 | ||
@@ -936,10 +935,8 @@ void vmalloc_sync_all(void) | |||
936 | spin_unlock_irqrestore(&pgd_lock, flags); | 935 | spin_unlock_irqrestore(&pgd_lock, flags); |
937 | } | 936 | } |
938 | #else /* CONFIG_X86_64 */ | 937 | #else /* CONFIG_X86_64 */ |
939 | unsigned long start = VMALLOC_START & PGDIR_MASK; | 938 | for (address = VMALLOC_START & PGDIR_MASK; address <= VMALLOC_END; |
940 | unsigned long address; | 939 | address += PGDIR_SIZE) { |
941 | |||
942 | for (address = start; address <= VMALLOC_END; address += PGDIR_SIZE) { | ||
943 | const pgd_t *pgd_ref = pgd_offset_k(address); | 940 | const pgd_t *pgd_ref = pgd_offset_k(address); |
944 | unsigned long flags; | 941 | unsigned long flags; |
945 | struct page *page; | 942 | struct page *page; |