[PATCH 2/7] arm64: PTE/PMD contiguous bit definition
Catalin Marinas
catalin.marinas at arm.com
Tue Oct 6 04:10:04 PDT 2015
On Fri, Oct 02, 2015 at 03:47:40PM -0500, Jeremy Linton wrote:
> Define the bit positions in the PTE and PMD for the
> contiguous bit.
>
> Signed-off-by: Jeremy Linton <jeremy.linton at arm.com>
> ---
> arch/arm64/include/asm/pgtable-hwdef.h | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/arch/arm64/include/asm/pgtable-hwdef.h b/arch/arm64/include/asm/pgtable-hwdef.h
> index 24154b0..361352d 100644
> --- a/arch/arm64/include/asm/pgtable-hwdef.h
> +++ b/arch/arm64/include/asm/pgtable-hwdef.h
> @@ -55,6 +55,13 @@
> #define SECTION_MASK (~(SECTION_SIZE-1))
>
> /*
> + * Contiguous page definitions.
> + */
> +#define CONT_RANGE (_AC(1, UL) << CONT_SHIFT)
> +#define CONT_RANGE_MASK ((CONT_RANGE-1) << PAGE_SHIFT)
> +#define CONT_RANGE_OFFSET(addr) (((addr)>>PAGE_SHIFT)&(CONT_RANGE-1))
This still looks confusing to me: CONT_RANGE refers to the number of
contiguous ptes while CONT_RANGE_MASK refers to actual addresses. I'd
rather have CONT_PTES (since we only use this for ptes currently) and
CONT_MASK used instead of CONT_RANGE_MASK. This is for consistency with
SECTION_MASK which we already use.
--
Catalin
More information about the linux-arm-kernel
mailing list