summaryrefslogtreecommitdiffstats
path: root/arch/arm/mm
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2009-12-18 16:23:44 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-01-20 13:48:29 +0000
commitf8a85f1164a33e3eb5b421b137ced793ed53ee33 (patch)
treece4cd8de4eeee853c87b41a594979fd9cb3b6db5 /arch/arm/mm
parentc26c20b823d48addbde9cb5709d80655c6fadf18 (diff)
downloadblackbird-op-linux-f8a85f1164a33e3eb5b421b137ced793ed53ee33.tar.gz
blackbird-op-linux-f8a85f1164a33e3eb5b421b137ced793ed53ee33.zip
ARM: make_coherent: convert adjust_pte() to use p*d_none_or_clear_bad()
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm')
-rw-r--r--arch/arm/mm/fault-armv.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/arch/arm/mm/fault-armv.c b/arch/arm/mm/fault-armv.c
index 074e6bb54eb3..7a8efe1b37d8 100644
--- a/arch/arm/mm/fault-armv.c
+++ b/arch/arm/mm/fault-armv.c
@@ -73,16 +73,12 @@ static int adjust_pte(struct vm_area_struct *vma, unsigned long address)
int ret;
pgd = pgd_offset(vma->vm_mm, address);
- if (pgd_none(*pgd))
- goto no_pgd;
- if (pgd_bad(*pgd))
- goto bad_pgd;
+ if (pgd_none_or_clear_bad(pgd))
+ return 0;
pmd = pmd_offset(pgd, address);
- if (pmd_none(*pmd))
- goto no_pmd;
- if (pmd_bad(*pmd))
- goto bad_pmd;
+ if (pmd_none_or_clear_bad(pmd))
+ return 0;
pte = pte_offset_map(pmd, address);
@@ -91,18 +87,6 @@ static int adjust_pte(struct vm_area_struct *vma, unsigned long address)
pte_unmap(pte);
return ret;
-
-bad_pgd:
- pgd_ERROR(*pgd);
- pgd_clear(pgd);
-no_pgd:
- return 0;
-
-bad_pmd:
- pmd_ERROR(*pmd);
- pmd_clear(pmd);
-no_pmd:
- return 0;
}
static void
OpenPOWER on IntegriCloud