Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0+ */
0002 
0003 #ifndef _ASM_POWERPC_BOOK3S_64_PKEYS_H
0004 #define _ASM_POWERPC_BOOK3S_64_PKEYS_H
0005 
0006 #include <asm/book3s/64/hash-pkey.h>
0007 
0008 static inline u64 vmflag_to_pte_pkey_bits(u64 vm_flags)
0009 {
0010     if (!mmu_has_feature(MMU_FTR_PKEY))
0011         return 0x0UL;
0012 
0013     if (radix_enabled())
0014         BUG();
0015     return hash__vmflag_to_pte_pkey_bits(vm_flags);
0016 }
0017 
0018 static inline u16 pte_to_pkey_bits(u64 pteflags)
0019 {
0020     if (radix_enabled())
0021         BUG();
0022     return hash__pte_to_pkey_bits(pteflags);
0023 }
0024 
0025 #endif /*_ASM_POWERPC_KEYS_H */