From: Michael Ellerman <mpe@ellerman•id.au>
To: Ram Pai <linuxram@us•ibm.com>
Cc: linuxppc-dev@lists•ozlabs.org, benh@kernel•crashing.org,
paulus@samba•org, khandual@linux•vnet.ibm.com,
aneesh.kumar@linux•vnet.ibm.com, bsingharora@gmail•com,
hbabu@us•ibm.com, mhocko@kernel•org, bauerman@linux•vnet.ibm.com,
ebiederm@xmission•com
Subject: Re: [PATCH] powerpc/memkey: feature applies to PPC_BOOK3S_64 archs only
Date: Wed, 11 Oct 2017 21:50:03 +1100 [thread overview]
Message-ID: <877ew2yn50.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <20171010162240.GA5362@ram.oc3035372033.ibm.com>
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 */
prev parent reply other threads:[~2017-10-11 10:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-09 16:11 [PATCH] powerpc/memkey: fix compilation error caused by upstream changes Ram Pai
2017-10-10 9:00 ` Michael Ellerman
2017-10-10 16:19 ` Ram Pai
2017-10-10 16:22 ` [PATCH] powerpc/memkey: feature applies to PPC_BOOK3S_64 archs only Ram Pai
2017-10-11 10:50 ` Michael Ellerman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877ew2yn50.fsf@concordia.ellerman.id.au \
--to=mpe@ellerman$(echo .)id.au \
--cc=aneesh.kumar@linux$(echo .)vnet.ibm.com \
--cc=bauerman@linux$(echo .)vnet.ibm.com \
--cc=benh@kernel$(echo .)crashing.org \
--cc=bsingharora@gmail$(echo .)com \
--cc=ebiederm@xmission$(echo .)com \
--cc=hbabu@us$(echo .)ibm.com \
--cc=khandual@linux$(echo .)vnet.ibm.com \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=linuxram@us$(echo .)ibm.com \
--cc=mhocko@kernel$(echo .)org \
--cc=paulus@samba$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox