powerpc: introduce get_mm_addr_key() helper
get_mm_addr_key() helper returns the pkey associated with an address corresponding to a given mm_struct. Signed-off-by: Ram Pai <linuxram@us.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
committed by
Michael Ellerman
parent
e6c2a4797e
commit
087003e9ef
@@ -260,6 +260,15 @@ static inline bool early_radix_enabled(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PPC_MEM_KEYS
|
||||
extern u16 get_mm_addr_key(struct mm_struct *mm, unsigned long address);
|
||||
#else
|
||||
static inline u16 get_mm_addr_key(struct mm_struct *mm, unsigned long address)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_PPC_MEM_KEYS */
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
/* The kernel use the constants below to index in the page sizes array.
|
||||
|
||||
Reference in New Issue
Block a user