Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/arch/powerpc/include/asm/book3s/64/pkeys.h
26519 views
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
27