Skip to content

Commit 325518e

Browse files
Christoph Hellwigsuryasaimadhu
authored andcommitted
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: Christoph Hellwig <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent de17a37 commit 325518e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/x86/include/asm/pgtable_types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ static inline pteval_t pte_flags(pte_t pte)
478478

479479
unsigned long cachemode2protval(enum page_cache_mode pcm);
480480

481-
static inline unsigned long protval_4k_2_large(unsigned long val)
481+
static inline pgprotval_t protval_4k_2_large(pgprotval_t val)
482482
{
483483
return (val & ~(_PAGE_PAT | _PAGE_PAT_LARGE)) |
484484
((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)
487487
{
488488
return __pgprot(protval_4k_2_large(pgprot_val(pgprot)));
489489
}
490-
static inline unsigned long protval_large_2_4k(unsigned long val)
490+
static inline pgprotval_t protval_large_2_4k(pgprotval_t val)
491491
{
492492
return (val & ~(_PAGE_PAT | _PAGE_PAT_LARGE)) |
493493
((val & _PAGE_PAT_LARGE) >>

0 commit comments

Comments
 (0)