Commit d8aa712c authored by Russell King's avatar Russell King

ARM: fix booting low-vectors machines

Commit f6f91b0d (ARM: allow kuser helpers to be removed from the
vector page) required two pages for the vectors code.  Although the
code setting up the initial page tables was updated, the code which
allocates page tables for new processes wasn't, neither was the code
which tears down the mappings.  Fix this.

Fixes: f6f91b0d ("ARM: allow kuser helpers to be removed from the vector page")
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Cc: <stable@vger.kernel.org>
parent 11a5aa32
...@@ -61,7 +61,7 @@ extern void __pgd_error(const char *file, int line, pgd_t); ...@@ -61,7 +61,7 @@ extern void __pgd_error(const char *file, int line, pgd_t);
* mapping to be mapped at. This is particularly important for * mapping to be mapped at. This is particularly important for
* non-high vector CPUs. * non-high vector CPUs.
*/ */
#define FIRST_USER_ADDRESS PAGE_SIZE #define FIRST_USER_ADDRESS (PAGE_SIZE * 2)
/* /*
* Use TASK_SIZE as the ceiling argument for free_pgtables() and * Use TASK_SIZE as the ceiling argument for free_pgtables() and
......
...@@ -146,7 +146,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, ...@@ -146,7 +146,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
info.flags = VM_UNMAPPED_AREA_TOPDOWN; info.flags = VM_UNMAPPED_AREA_TOPDOWN;
info.length = len; info.length = len;
info.low_limit = PAGE_SIZE; info.low_limit = FIRST_USER_ADDRESS;
info.high_limit = mm->mmap_base; info.high_limit = mm->mmap_base;
info.align_mask = do_align ? (PAGE_MASK & (SHMLBA - 1)) : 0; info.align_mask = do_align ? (PAGE_MASK & (SHMLBA - 1)) : 0;
info.align_offset = pgoff << PAGE_SHIFT; info.align_offset = pgoff << PAGE_SHIFT;
......
...@@ -87,7 +87,8 @@ pgd_t *pgd_alloc(struct mm_struct *mm) ...@@ -87,7 +87,8 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
init_pud = pud_offset(init_pgd, 0); init_pud = pud_offset(init_pgd, 0);
init_pmd = pmd_offset(init_pud, 0); init_pmd = pmd_offset(init_pud, 0);
init_pte = pte_offset_map(init_pmd, 0); init_pte = pte_offset_map(init_pmd, 0);
set_pte_ext(new_pte, *init_pte, 0); set_pte_ext(new_pte + 0, init_pte[0], 0);
set_pte_ext(new_pte + 1, init_pte[1], 0);
pte_unmap(init_pte); pte_unmap(init_pte);
pte_unmap(new_pte); pte_unmap(new_pte);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment