diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-11-21 17:27:49 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-02-21 20:24:14 +0100 |
commit | 516295e5ab4bf986865cfff856d484ec678e3b0b (patch) | |
tree | 2125f49635462fca18ac6d36ebf7363d3cc6d521 /arch/arm/mm/fault-armv.c | |
parent | ARM: 6673/1: LPAE: use phys_addr_t instead of unsigned long for start of memb... (diff) | |
download | linux-516295e5ab4bf986865cfff856d484ec678e3b0b.tar.xz linux-516295e5ab4bf986865cfff856d484ec678e3b0b.zip |
ARM: pgtable: add pud-level code
Add pud_offset() et.al. between the pgd and pmd code in preparation of
using pgtable-nopud.h rather than 4level-fixup.h.
This incorporates a fix from Jamie Iles <jamie@jamieiles.com> for
uaccess_with_memcpy.c.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/fault-armv.c')
-rw-r--r-- | arch/arm/mm/fault-armv.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/mm/fault-armv.c b/arch/arm/mm/fault-armv.c index 01210dba0221..7cab79179421 100644 --- a/arch/arm/mm/fault-armv.c +++ b/arch/arm/mm/fault-armv.c @@ -95,6 +95,7 @@ static int adjust_pte(struct vm_area_struct *vma, unsigned long address, { spinlock_t *ptl; pgd_t *pgd; + pud_t *pud; pmd_t *pmd; pte_t *pte; int ret; @@ -103,7 +104,11 @@ static int adjust_pte(struct vm_area_struct *vma, unsigned long address, if (pgd_none_or_clear_bad(pgd)) return 0; - pmd = pmd_offset(pgd, address); + pud = pud_offset(pgd, address); + if (pud_none_or_clear_bad(pud)) + return 0; + + pmd = pmd_offset(pud, address); if (pmd_none_or_clear_bad(pmd)) return 0; |