aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/book3s/64
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>2020-11-27 10:14:05 +0530
committerMichael Ellerman <mpe@ellerman.id.au>2020-12-04 01:01:24 +1100
commit227ae625522c65c4535cabe407f47abc058585ed (patch)
tree115f18a716578ca066bd895cb283c3d028705fbc /arch/powerpc/include/asm/book3s/64
parentKVM: PPC: BOOK3S: PR: Ignore UAMOR SPR (diff)
downloadlinux-dev-227ae625522c65c4535cabe407f47abc058585ed.tar.xz
linux-dev-227ae625522c65c4535cabe407f47abc058585ed.zip
powerpc/book3s64/kuap/kuep: Add PPC_PKEY config on book3s64
The config CONFIG_PPC_PKEY is used to select the base support that is required for PPC_MEM_KEYS, KUAP, and KUEP. Adding this dependency reduces the code complexity(in terms of #ifdefs) and enables us to move some of the initialization code to pkeys.c Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20201127044424.40686-4-aneesh.kumar@linux.ibm.com
Diffstat (limited to 'arch/powerpc/include/asm/book3s/64')
-rw-r--r--arch/powerpc/include/asm/book3s/64/kup-radix.h4
-rw-r--r--arch/powerpc/include/asm/book3s/64/mmu.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/include/asm/book3s/64/kup-radix.h b/arch/powerpc/include/asm/book3s/64/kup-radix.h
index a39e2d193fdc..2fb8ee7b1e2a 100644
--- a/arch/powerpc/include/asm/book3s/64/kup-radix.h
+++ b/arch/powerpc/include/asm/book3s/64/kup-radix.h
@@ -16,7 +16,7 @@
#ifdef CONFIG_PPC_KUAP
BEGIN_MMU_FTR_SECTION_NESTED(67)
mfspr \gpr1, SPRN_AMR
- ld \gpr2, STACK_REGS_KUAP(r1)
+ ld \gpr2, STACK_REGS_AMR(r1)
cmpd \gpr1, \gpr2
beq 998f
isync
@@ -48,7 +48,7 @@
bne \msr_pr_cr, 99f
.endif
mfspr \gpr1, SPRN_AMR
- std \gpr1, STACK_REGS_KUAP(r1)
+ std \gpr1, STACK_REGS_AMR(r1)
li \gpr2, (AMR_KUAP_BLOCKED >> AMR_KUAP_SHIFT)
sldi \gpr2, \gpr2, AMR_KUAP_SHIFT
cmpd \use_cr, \gpr1, \gpr2
diff --git a/arch/powerpc/include/asm/book3s/64/mmu.h b/arch/powerpc/include/asm/book3s/64/mmu.h
index ad0837d8076d..d0365914686e 100644
--- a/arch/powerpc/include/asm/book3s/64/mmu.h
+++ b/arch/powerpc/include/asm/book3s/64/mmu.h
@@ -199,7 +199,7 @@ extern int mmu_io_psize;
void mmu_early_init_devtree(void);
void hash__early_init_devtree(void);
void radix__early_init_devtree(void);
-#ifdef CONFIG_PPC_MEM_KEYS
+#ifdef CONFIG_PPC_PKEY
void pkey_early_init_devtree(void);
#else
static inline void pkey_early_init_devtree(void) {}