diff mbox series

powerpc/memkey: feature applies to PPC_BOOK3S_64 archs only

Message ID 20171010162240.GA5362@ram.oc3035372033.ibm.com (mailing list archive)
State Changes Requested
Headers show
Series powerpc/memkey: feature applies to PPC_BOOK3S_64 archs only | expand

Commit Message

Ram Pai Oct. 10, 2017, 4:22 p.m. UTC
Currently protection key feature is erroneously configured to
be enabled for any flavor of PPC64. This patch fixes it.

Signed-off-by: Ram Pai <linuxram@us.ibm.com>
---
 arch/powerpc/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Michael Ellerman Oct. 11, 2017, 10:50 a.m. UTC | #1
Ram Pai <linuxram@us.ibm.com> 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 <linuxram@us.ibm.com>
> ---
>  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 */
diff mbox series

Patch

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
 	---help---