arm64: fix STRICT_MM_TYPECHECKS issue in PTE_CONT manipulation
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 9 Nov 2015 08:55:45 +0000 (09:55 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Mon, 9 Nov 2015 14:23:16 +0000 (14:23 +0000)
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 <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/mm/mmu.c

index c2fa6b56613c23ba111c94310df522454e2ea732..2784f052df5e71b989a0ae801b34107e3f41ac73 100644 (file)
@@ -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