arm64/mm: Remove [PUD|PMD]_TABLE_BIT from [pud|pmd]_bad()
authorAnshuman Khandual <anshuman.khandual@arm.com>
Mon, 10 May 2021 11:07:51 +0000 (16:37 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Apr 2022 11:53:52 +0000 (13:53 +0200)
commit18ff7a2efa4e14a6bd86aad31a6a8cebdf0dbabc
treedc9c7a5bdc53f3a2bd5bb90b22989b1e9326fd5f
parent3bf8ca35017024fa1cad55344f798cd5cd131c16
arm64/mm: Remove [PUD|PMD]_TABLE_BIT from [pud|pmd]_bad()

[ Upstream commit e377ab82311af95c99648c6424a6b888a0ccb102 ]

Semantics wise, [pud|pmd]_bad() have always implied that a given [PUD|PMD]
entry does not have a pointer to the next level page table. This had been
made clear in the commit a1c76574f345 ("arm64: mm: use *_sect to check for
section maps"). Hence explicitly check for a table entry rather than just
testing a single bit. This basically redefines [pud|pmd]_bad() in terms of
[pud|pmd]_table() making the semantics clear.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/1620644871-26280-1-git-send-email-anshuman.khandual@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm64/include/asm/pgtable.h