aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/include/asm/page.h2
-rw-r--r--arch/arm/kernel/process.c7
-rw-r--r--arch/arm/mm/mmu.c4
3 files changed, 12 insertions, 1 deletions
diff --git a/arch/arm/include/asm/page.h b/arch/arm/include/asm/page.h
index 6363f3d1d505..4355f0ec44d6 100644
--- a/arch/arm/include/asm/page.h
+++ b/arch/arm/include/asm/page.h
@@ -142,7 +142,9 @@ extern void __cpu_copy_user_highpage(struct page *to, struct page *from,
142#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) 142#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE)
143extern void copy_page(void *to, const void *from); 143extern void copy_page(void *to, const void *from);
144 144
145#ifdef CONFIG_KUSER_HELPERS
145#define __HAVE_ARCH_GATE_AREA 1 146#define __HAVE_ARCH_GATE_AREA 1
147#endif
146 148
147#ifdef CONFIG_ARM_LPAE 149#ifdef CONFIG_ARM_LPAE
148#include <asm/pgtable-3level-types.h> 150#include <asm/pgtable-3level-types.h>
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 566d0d71a1e7..1e6c33d01c05 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -426,6 +426,7 @@ unsigned long arch_randomize_brk(struct mm_struct *mm)
426} 426}
427 427
428#ifdef CONFIG_MMU 428#ifdef CONFIG_MMU
429#ifdef CONFIG_KUSER_HELPERS
429/* 430/*
430 * The vectors page is always readable from user space for the 431 * The vectors page is always readable from user space for the
431 * atomic helpers. Insert it into the gate_vma so that it is visible 432 * atomic helpers. Insert it into the gate_vma so that it is visible
@@ -458,10 +459,14 @@ int in_gate_area_no_mm(unsigned long addr)
458{ 459{
459 return in_gate_area(NULL, addr); 460 return in_gate_area(NULL, addr);
460} 461}
462#define is_gate_vma(vma) ((vma) = &gate_vma)
463#else
464#define is_gate_vma(vma) 0
465#endif
461 466
462const char *arch_vma_name(struct vm_area_struct *vma) 467const char *arch_vma_name(struct vm_area_struct *vma)
463{ 468{
464 return (vma == &gate_vma) ? "[vectors]" : 469 return is_gate_vma(vma) ? "[vectors]" :
465 (vma->vm_mm && vma->vm_start == vma->vm_mm->context.sigpage) ? 470 (vma->vm_mm && vma->vm_start == vma->vm_mm->context.sigpage) ?
466 "[sigpage]" : NULL; 471 "[sigpage]" : NULL;
467} 472}
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 9ea274d1af69..ca46f413d867 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -1205,7 +1205,11 @@ static void __init devicemaps_init(struct machine_desc *mdesc)
1205 map.pfn = __phys_to_pfn(virt_to_phys(vectors)); 1205 map.pfn = __phys_to_pfn(virt_to_phys(vectors));
1206 map.virtual = 0xffff0000; 1206 map.virtual = 0xffff0000;
1207 map.length = PAGE_SIZE; 1207 map.length = PAGE_SIZE;
1208#ifdef CONFIG_KUSER_HELPERS
1208 map.type = MT_HIGH_VECTORS; 1209 map.type = MT_HIGH_VECTORS;
1210#else
1211 map.type = MT_LOW_VECTORS;
1212#endif
1209 create_mapping(&map); 1213 create_mapping(&map);
1210 1214
1211 if (!vectors_high()) { 1215 if (!vectors_high()) {