arm64/mm: Redefine CONT_{PTE, PMD}_SHIFT
authorGavin Shan <gshan@redhat.com>
Tue, 30 Jun 2020 06:24:28 +0000 (16:24 +1000)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 3 Jul 2020 16:49:58 +0000 (17:49 +0100)
commita1634a542f74309f843742fa849208bb26e279e4
tree54d045171d27a23e6101da244631169cc28c3aa2
parent2a379716f3d76aebc5574155de247b547a0214cc
arm64/mm: Redefine CONT_{PTE, PMD}_SHIFT

Currently, the value of CONT_{PTE, PMD}_SHIFT is off from standard
{PAGE, PMD}_SHIFT. In turn, we have to consider adding {PAGE, PMD}_SHIFT
when using CONT_{PTE, PMD}_SHIFT in the function hugetlbpage_init().
It's a bit confusing.

This redefines CONT_{PTE, PMD}_SHIFT with {PAGE, PMD}_SHIFT included
so that the later values needn't be added when using the former ones
in function hugetlbpage_init(). Note that the values of CONT_{PTES, PMDS}
are unchanged.

Suggested-by: Will Deacon <will@kernel.org>
Signed-off-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Link: https://lkml.org/lkml/2020/5/6/190
Link: https://lore.kernel.org/r/20200630062428.194235-1-gshan@redhat.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/pgtable-hwdef.h
arch/arm64/mm/hugetlbpage.c