From: Will Deacon Date: Tue, 28 Jul 2015 15:14:03 +0000 (+0100) Subject: arm64: pgtable: fix definition of pte_valid X-Git-Tag: v4.14-rc1~4765^2~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=766ffb69803943c2b580a44ac14a189b875d21f6;p=platform%2Fkernel%2Flinux-rpi.git arm64: pgtable: fix definition of pte_valid pte_valid should check if the PTE_VALID bit (1 << 0) is set in the pte, so fix the macro definition to use bitwise & instead of logical &&. Signed-off-by: Will Deacon --- diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index d001846..6900b2d9 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -153,7 +153,7 @@ extern struct page *empty_zero_page; #define pte_sw_dirty(pte) (!!(pte_val(pte) & PTE_DIRTY)) #define pte_dirty(pte) (pte_sw_dirty(pte) || pte_hw_dirty(pte)) -#define pte_valid(pte) (!!(pte_val(pte) && PTE_VALID)) +#define pte_valid(pte) (!!(pte_val(pte) & PTE_VALID)) #define pte_valid_user(pte) \ ((pte_val(pte) & (PTE_VALID | PTE_USER)) == (PTE_VALID | PTE_USER)) #define pte_valid_not_user(pte) \