aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc/mm/fault.c
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2015-03-05 06:36:31 -0500
committerVineet Gupta <vgupta@synopsys.com>2015-10-28 10:01:05 -0400
commit336e2136e1353db8e9e731c27381ee0735656a8a (patch)
treee386405627b5e1f68f04a1d4f854f3121b913d45 /arch/arc/mm/fault.c
parentd40846457fc23cd841a60fdc2786e08a8bedb35b (diff)
ARC: mm: preps ahead of HIGHMEM support
Before we plug in highmem support, some of code needs to be ready for it - copy_user_highpage() needs to be using the kmap_atomic API - mk_pte() can't assume page_address() - do_page_fault() can't assume VMALLOC_END is end of kernel vaddr space Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/mm/fault.c')
-rw-r--r--arch/arc/mm/fault.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/arch/arc/mm/fault.c b/arch/arc/mm/fault.c
index d948e4e9d89c..af63f4a13e60 100644
--- a/arch/arc/mm/fault.c
+++ b/arch/arc/mm/fault.c
@@ -18,7 +18,14 @@
18#include <asm/pgalloc.h> 18#include <asm/pgalloc.h>
19#include <asm/mmu.h> 19#include <asm/mmu.h>
20 20
21static int handle_vmalloc_fault(unsigned long address) 21/*
22 * kernel virtual address is required to implement vmalloc/pkmap/fixmap
23 * Refer to asm/processor.h for System Memory Map
24 *
25 * It simply copies the PMD entry (pointer to 2nd level page table or hugepage)
26 * from swapper pgdir to task pgdir. The 2nd level table/page is thus shared
27 */
28noinline static int handle_kernel_vaddr_fault(unsigned long address)
22{ 29{
23 /* 30 /*
24 * Synchronize this task's top level page-table 31 * Synchronize this task's top level page-table
@@ -72,8 +79,8 @@ void do_page_fault(unsigned long address, struct pt_regs *regs)
72 * only copy the information from the master page table, 79 * only copy the information from the master page table,
73 * nothing more. 80 * nothing more.
74 */ 81 */
75 if (address >= VMALLOC_START && address <= VMALLOC_END) { 82 if (address >= VMALLOC_START) {
76 ret = handle_vmalloc_fault(address); 83 ret = handle_kernel_vaddr_fault(address);
77 if (unlikely(ret)) 84 if (unlikely(ret))
78 goto bad_area_nosemaphore; 85 goto bad_area_nosemaphore;
79 else 86 else