diff mbox series

[v2,1/3] arm64/mm: Remove CONT_RANGE_OFFSET

Message ID 20200910095936.20307-1-gshan@redhat.com (mailing list archive)
State New, archived
Headers show
Series [v2,1/3] arm64/mm: Remove CONT_RANGE_OFFSET | expand

Commit Message

Gavin Shan Sept. 10, 2020, 9:59 a.m. UTC
The macro was introduced by commit <ecf35a237a85> ("arm64: PTE/PMD
contiguous bit definition") at the beginning. It's only used by
commit <348a65cdcbbf> ("arm64: Mark kernel page ranges contiguous"),
which was reverted later by commit <667c27597ca8>. This makes the
macro unused.

This removes the unused macro (CONT_RANGE_OFFSET).

Signed-off-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
 arch/arm64/include/asm/pgtable-hwdef.h | 2 --
 1 file changed, 2 deletions(-)

Comments

Catalin Marinas Sept. 11, 2020, 3:28 p.m. UTC | #1
On Thu, Sep 10, 2020 at 07:59:34PM +1000, Gavin Shan wrote:
> The macro was introduced by commit <ecf35a237a85> ("arm64: PTE/PMD
> contiguous bit definition") at the beginning. It's only used by
> commit <348a65cdcbbf> ("arm64: Mark kernel page ranges contiguous"),
> which was reverted later by commit <667c27597ca8>. This makes the
> macro unused.
> 
> This removes the unused macro (CONT_RANGE_OFFSET).
> 
> Signed-off-by: Gavin Shan <gshan@redhat.com>
> Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Will Deacon Sept. 11, 2020, 4:33 p.m. UTC | #2
On Thu, 10 Sep 2020 19:59:34 +1000, Gavin Shan wrote:
> The macro was introduced by commit <ecf35a237a85> ("arm64: PTE/PMD
> contiguous bit definition") at the beginning. It's only used by
> commit <348a65cdcbbf> ("arm64: Mark kernel page ranges contiguous"),
> which was reverted later by commit <667c27597ca8>. This makes the
> macro unused.
> 
> This removes the unused macro (CONT_RANGE_OFFSET).

Applied to arm64 (for-next/mm), thanks!

[1/3] arm64/mm: Remove CONT_RANGE_OFFSET
      https://git.kernel.org/arm64/c/11e339d53a73
[2/3] arm64/mm: Unify CONT_PTE_SHIFT
      https://git.kernel.org/arm64/c/c0d6de327f18
[3/3] arm64/mm: Unify CONT_PMD_SHIFT
      https://git.kernel.org/arm64/c/e676594115f0

Cheers,
diff mbox series

Patch

diff --git a/arch/arm64/include/asm/pgtable-hwdef.h b/arch/arm64/include/asm/pgtable-hwdef.h
index d400a4d9aee2..8a399e666837 100644
--- a/arch/arm64/include/asm/pgtable-hwdef.h
+++ b/arch/arm64/include/asm/pgtable-hwdef.h
@@ -98,8 +98,6 @@ 
 #define CONT_PMDS		(1 << (CONT_PMD_SHIFT - PMD_SHIFT))
 #define CONT_PMD_SIZE		(CONT_PMDS * PMD_SIZE)
 #define CONT_PMD_MASK		(~(CONT_PMD_SIZE - 1))
-/* the numerical offset of the PTE within a range of CONT_PTES */
-#define CONT_RANGE_OFFSET(addr) (((addr)>>PAGE_SHIFT)&(CONT_PTES-1))
 
 /*
  * Hardware page table definitions.