On Thu, Sep 14, 2017 at 01:32:05PM +1000, Balbir Singh wrote: > On Fri, 8 Sep 2017 15:44:49 -0700 > Ram Pai <linux...@us.ibm.com> wrote: > > > Basic plumbing to initialize the pkey system. > > Nothing is enabled yet. A later patch will enable it > > ones all the infrastructure is in place. > > > > Signed-off-by: Ram Pai <linux...@us.ibm.com> > > --- > > arch/powerpc/Kconfig | 16 +++++++++++ > > arch/powerpc/include/asm/mmu_context.h | 5 +++ > > arch/powerpc/include/asm/pkeys.h | 45 > > ++++++++++++++++++++++++++++++++ > > arch/powerpc/kernel/setup_64.c | 4 +++ > > arch/powerpc/mm/Makefile | 1 + > > arch/powerpc/mm/hash_utils_64.c | 1 + > > arch/powerpc/mm/pkeys.c | 33 +++++++++++++++++++++++ > > 7 files changed, 105 insertions(+), 0 deletions(-) > > create mode 100644 arch/powerpc/include/asm/pkeys.h > > create mode 100644 arch/powerpc/mm/pkeys.c > > > > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > > index 9fc3c0b..a4cd210 100644 > > --- a/arch/powerpc/Kconfig > > +++ b/arch/powerpc/Kconfig > > @@ -864,6 +864,22 @@ config SECCOMP > > > > If unsure, say Y. Only embedded should say N here. > > > > +config PPC64_MEMORY_PROTECTION_KEYS > > + prompt "PowerPC Memory Protection Keys" > > + def_bool y > > + # Note: only available in 64-bit mode > > + depends on PPC64 > > This is not sufficient right, you need PPC_BOOK3S_64 > for compile time at-least?
Ok. Not thought too deep about this. Thanks for the input. > > > + select ARCH_USES_HIGH_VMA_FLAGS > > + ..... > > +void __init pkey_initialize(void) > > +{ > > + /* disable the pkey system till everything > > + * is in place. A patch further down the > > + * line will enable it. > > + */ > > Comment style is broken > checkpatch.pl does not complain. So is it really a broken comment style, or is it checkpatch.pl needs to be fixed? RP