OSDN Git Service

powerpc/mm: Remove unneeded #ifdef CONFIG_PPC_MEM_KEYS
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Mon, 15 Mar 2021 14:52:51 +0000 (14:52 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 29 Mar 2021 02:22:15 +0000 (13:22 +1100)
commit98c26a72751ecb2ed247cdfd6cb2385f37195707
treea70dfcd35e09bcf329e8d57f52b207a16b22ce67
parentb77878052a142737522e0e3c2a621c988a4cd7cd
powerpc/mm: Remove unneeded #ifdef CONFIG_PPC_MEM_KEYS

In fault.c, #ifdef CONFIG_PPC_MEM_KEYS is not needed because all
functions are always defined, and arch_vma_access_permitted()
always returns true when CONFIG_PPC_MEM_KEYS is not defined so
access_pkey_error() will return false so bad_access_pkey()
will never be called.

Include linux/pkeys.h to get a definition of vma_pkeys() for
bad_access_pkey().

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/8038392f38d81f2ad169347efac29146f553b238.1615819955.git.christophe.leroy@csgroup.eu
arch/powerpc/mm/fault.c