Warning: This file is not a C or C++ file. It does not have highlighting.
| 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
|---|---|
| 2 | |
| 3 | #ifndef _ASM_POWERPC_BOOK3S_64_PKEYS_H |
| 4 | #define _ASM_POWERPC_BOOK3S_64_PKEYS_H |
| 5 | |
| 6 | #include <asm/book3s/64/hash-pkey.h> |
| 7 | |
| 8 | static inline u64 vmflag_to_pte_pkey_bits(vm_flags_t vm_flags) |
| 9 | { |
| 10 | if (!mmu_has_feature(MMU_FTR_PKEY)) |
| 11 | return 0x0UL; |
| 12 | |
| 13 | if (radix_enabled()) |
| 14 | BUG(); |
| 15 | return hash__vmflag_to_pte_pkey_bits(vm_flags); |
| 16 | } |
| 17 | |
| 18 | static inline u16 pte_to_pkey_bits(u64 pteflags) |
| 19 | { |
| 20 | if (radix_enabled()) |
| 21 | BUG(); |
| 22 | return hash__pte_to_pkey_bits(pteflags); |
| 23 | } |
| 24 | |
| 25 | #endif /*_ASM_POWERPC_KEYS_H */ |
| 26 |
Warning: This file is not a C or C++ file. It does not have highlighting.
