Ram Pai <[email protected]> writes:

> Currently protection key feature is erroneously configured to
> be enabled for any flavor of PPC64. This patch fixes it.
>
> Signed-off-by: Ram Pai <[email protected]>
> ---
>  arch/powerpc/Kconfig |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> index 7dee449..4b2b055 100644
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -868,7 +868,7 @@ config PPC64_MEMORY_PROTECTION_KEYS
>       prompt "PowerPC Memory Protection Keys"
>       def_bool y
>       # Note: only available in 64-bit mode
> -     depends on PPC64
> +     depends on PPC_BOOK3S_64
>       select ARCH_USES_HIGH_VMA_FLAGS
>       select ARCH_HAS_PKEYS

That didn't really help.

I needed the patch below to get it building.

cheers

diff --git a/arch/powerpc/include/asm/pkeys.h b/arch/powerpc/include/asm/pkeys.h
index da0d5e64ffab..28fad534333d 100644
--- a/arch/powerpc/include/asm/pkeys.h
+++ b/arch/powerpc/include/asm/pkeys.h
@@ -1,6 +1,8 @@
 #ifndef _ASM_PPC64_PKEYS_H
 #define _ASM_PPC64_PKEYS_H
 
+#ifdef CONFIG_PPC64_MEMORY_PROTECTION_KEYS
+
 #include <asm/firmware.h>
 
 extern bool pkey_inited;
@@ -247,4 +249,7 @@ extern void thread_pkey_regs_restore(struct thread_struct 
*new_thread,
                        struct thread_struct *old_thread);
 extern void thread_pkey_regs_init(struct thread_struct *thread);
 extern void pkey_initialize(void);
+
+#endif /* CONFIG_PPC64_MEMORY_PROTECTION_KEYS */
+
 #endif /*_ASM_PPC64_PKEYS_H */

Reply via email to