diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-12-18 11:23:44 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-01-20 08:48:29 -0500 |
commit | f8a85f1164a33e3eb5b421b137ced793ed53ee33 (patch) | |
tree | ce4cd8de4eeee853c87b41a594979fd9cb3b6db5 /arch/arm/mm | |
parent | c26c20b823d48addbde9cb5709d80655c6fadf18 (diff) |
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.c | 24 |
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) | |||
73 | int ret; | 73 | int ret; |
74 | 74 | ||
75 | pgd = pgd_offset(vma->vm_mm, address); | 75 | pgd = pgd_offset(vma->vm_mm, address); |
76 | if (pgd_none(*pgd)) | 76 | if (pgd_none_or_clear_bad(pgd)) |
77 | goto no_pgd; | 77 | return 0; |
78 | if (pgd_bad(*pgd)) | ||
79 | goto bad_pgd; | ||
80 | 78 | ||
81 | pmd = pmd_offset(pgd, address); | 79 | pmd = pmd_offset(pgd, address); |
82 | if (pmd_none(*pmd)) | 80 | if (pmd_none_or_clear_bad(pmd)) |
83 | goto no_pmd; | 81 | return 0; |
84 | if (pmd_bad(*pmd)) | ||
85 | goto bad_pmd; | ||
86 | 82 | ||
87 | pte = pte_offset_map(pmd, address); | 83 | pte = pte_offset_map(pmd, address); |
88 | 84 | ||
@@ -91,18 +87,6 @@ static int adjust_pte(struct vm_area_struct *vma, unsigned long address) | |||
91 | pte_unmap(pte); | 87 | pte_unmap(pte); |
92 | 88 | ||
93 | return ret; | 89 | return ret; |
94 | |||
95 | bad_pgd: | ||
96 | pgd_ERROR(*pgd); | ||
97 | pgd_clear(pgd); | ||
98 | no_pgd: | ||
99 | return 0; | ||
100 | |||
101 | bad_pmd: | ||
102 | pmd_ERROR(*pmd); | ||
103 | pmd_clear(pmd); | ||
104 | no_pmd: | ||
105 | return 0; | ||
106 | } | 90 | } |
107 | 91 | ||
108 | static void | 92 | static void |