Skip to content

Commit bbac8c6

Browse files
toshikaniKAGA-KOKO
authored andcommitted
x86/asm: Add pud_pgprot() and pmd_pgprot()
pte_pgprot() returns a pgprot_t value by calling pte_flags(). Now that pud_flags() and pmd_flags() work specifically for the pud/pmd levels, define pud_pgprot() and pmd_pgprot() for PUD/PMD. Also update pte_pgprot() to remove the unnecessary mask with PTE_FLAGS_MASK as pte_flags() takes care of it. Signed-off-by: Toshi Kani <toshi.kani@hpe.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Juergen Gross <jgross@suse.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Konrad Wilk <konrad.wilk@oracle.com> Cc: Robert Elliot <elliott@hpe.com> Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/1442514264-12475-6-git-send-email-toshi.kani@hpe.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
1 parent f70abb0 commit bbac8c6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

arch/x86/include/asm/pgtable.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,9 @@ static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot)
379379
return __pgprot(preservebits | addbits);
380380
}
381381

382-
#define pte_pgprot(x) __pgprot(pte_flags(x) & PTE_FLAGS_MASK)
382+
#define pte_pgprot(x) __pgprot(pte_flags(x))
383+
#define pmd_pgprot(x) __pgprot(pmd_flags(x))
384+
#define pud_pgprot(x) __pgprot(pud_flags(x))
383385

384386
#define canon_pgprot(p) __pgprot(massage_pgprot(p))
385387

0 commit comments

Comments
 (0)