Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754060AbbHEVrZ (ORCPT ); Wed, 5 Aug 2015 17:47:25 -0400 Received: from g2t2354.austin.hp.com ([15.217.128.53]:51428 "EHLO g2t2354.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753583AbbHEVpX (ORCPT ); Wed, 5 Aug 2015 17:45:23 -0400 From: Toshi Kani To: hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com Cc: akpm@linux-foundation.org, bp@alien8.de, linux-mm@kvack.org, linux-kernel@vger.kernel.org, x86@kernel.org, jgross@suse.com, konrad.wilk@oracle.com, elliott@hp.com, Toshi Kani Subject: [PATCH v3 4/10] x86/asm: Add pud_pgprot() and pmd_pgprot() Date: Wed, 5 Aug 2015 15:43:27 -0600 Message-Id: <1438811013-30983-5-git-send-email-toshi.kani@hp.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1438811013-30983-1-git-send-email-toshi.kani@hp.com> References: <1438811013-30983-1-git-send-email-toshi.kani@hp.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1462 Lines: 36 pte_pgprot() returns a pgprot_t value by calling pte_flags(). Now that pud_flags() and pmd_flags() work differently from pte_flags(), define pud_pgprot() and pmd_pgprot() for PUD/PMD. Also update pte_pgprot() to remove the masking with PTE_FLAGS_MASK, which is unnecessary since pte_flags() takes care of it. Signed-off-by: Toshi Kani Cc: Juergen Gross Cc: Thomas Gleixner Cc: H. Peter Anvin Cc: Ingo Molnar Cc: Borislav Petkov --- arch/x86/include/asm/pgtable.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 0733ec7..59fc341 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -379,7 +379,9 @@ static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot) return __pgprot(preservebits | addbits); } -#define pte_pgprot(x) __pgprot(pte_flags(x) & PTE_FLAGS_MASK) +#define pte_pgprot(x) __pgprot(pte_flags(x)) +#define pmd_pgprot(x) __pgprot(pmd_flags(x)) +#define pud_pgprot(x) __pgprot(pud_flags(x)) #define canon_pgprot(p) __pgprot(massage_pgprot(p)) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/