Skip to content

Commit 9c00697

Browse files
wildea01torvalds
authored andcommitted
arm64: mmu: drop pXd_present() checks from pXd_free_pYd_table()
The core code already has a check for pXd_none(), so remove it from the architecture implementation. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]> Cc: Chintan Pandya <[email protected]> Cc: Toshi Kani <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Michal Hocko <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Sean Christopherson <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent d239865 commit 9c00697

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

arch/arm64/mm/mmu.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,10 +1003,8 @@ int pmd_free_pte_page(pmd_t *pmdp, unsigned long addr)
10031003

10041004
pmd = READ_ONCE(*pmdp);
10051005

1006-
if (!pmd_present(pmd))
1007-
return 1;
10081006
if (!pmd_table(pmd)) {
1009-
VM_WARN_ON(!pmd_table(pmd));
1007+
VM_WARN_ON(1);
10101008
return 1;
10111009
}
10121010

@@ -1026,10 +1024,8 @@ int pud_free_pmd_page(pud_t *pudp, unsigned long addr)
10261024

10271025
pud = READ_ONCE(*pudp);
10281026

1029-
if (!pud_present(pud))
1030-
return 1;
10311027
if (!pud_table(pud)) {
1032-
VM_WARN_ON(!pud_table(pud));
1028+
VM_WARN_ON(1);
10331029
return 1;
10341030
}
10351031

0 commit comments

Comments
 (0)