From: Ard Biesheuvel Date: Mon, 9 Nov 2015 08:55:45 +0000 (+0100) Subject: arm64: fix STRICT_MM_TYPECHECKS issue in PTE_CONT manipulation X-Git-Tag: v5.15~14707^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b219545e9646e9d4089a74029c82ae59645e12ae;p=platform%2Fkernel%2Flinux-starfive.git arm64: fix STRICT_MM_TYPECHECKS issue in PTE_CONT manipulation The new page table code that manipulates the PTE_CONT flags does so in a way that is inconsistent with STRICT_MM_TYPECHECKS. Fix it by using the correct combination of __pgprot() and pgprot_val(). Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas --- diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index c2fa6b5..2784f05 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -146,7 +146,7 @@ static void alloc_init_pte(pmd_t *pmd, unsigned long addr, if (((addr | next | phys) & ~CONT_MASK) == 0) { /* a block of CONT_PTES */ __populate_init_pte(pte, addr, next, phys, - prot | __pgprot(PTE_CONT)); + __pgprot(pgprot_val(prot) | PTE_CONT)); } else { /* * If the range being split is already inside of a