]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
x86/mm: Use pgprotval_t in protval_4k_2_large() and protval_large_2_4k()
authorChristoph Hellwig <hch@lst.de>
Wed, 22 Apr 2020 16:53:08 +0000 (18:53 +0200)
committerBorislav Petkov <bp@suse.de>
Thu, 23 Apr 2020 09:38:42 +0000 (11:38 +0200)
Use the proper type for "raw" page table values.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200422170116.GA28345@lst.de
arch/x86/include/asm/pgtable_types.h

index 567abdbd64d31b19af766d8f810ad09026d7f009..7b6ddcf77d706dc46b34e45530b425243fc9c4a4 100644 (file)
@@ -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) >>