Commit 325518e9 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Borislav Petkov

x86/mm: Use pgprotval_t in protval_4k_2_large() and protval_large_2_4k()

Use the proper type for "raw" page table values.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200422170116.GA28345@lst.de
parent de17a378
......@@ -478,7 +478,7 @@ static inline pteval_t pte_flags(pte_t pte)
unsigned long cachemode2protval(enum page_cache_mode pcm);
static inline unsigned long protval_4k_2_large(unsigned long val)
static inline pgprotval_t protval_4k_2_large(pgprotval_t val)
{
return (val & ~(_PAGE_PAT | _PAGE_PAT_LARGE)) |
((val & _PAGE_PAT) << (_PAGE_BIT_PAT_LARGE - _PAGE_BIT_PAT));
......@@ -487,7 +487,7 @@ static inline pgprot_t pgprot_4k_2_large(pgprot_t pgprot)
{
return __pgprot(protval_4k_2_large(pgprot_val(pgprot)));
}
static inline unsigned long protval_large_2_4k(unsigned long val)
static inline pgprotval_t protval_large_2_4k(pgprotval_t val)
{
return (val & ~(_PAGE_PAT | _PAGE_PAT_LARGE)) |
((val & _PAGE_PAT_LARGE) >>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment