summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/nohash/32/kup-8xx.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/include/asm/nohash/32/kup-8xx.h')
-rw-r--r--arch/powerpc/include/asm/nohash/32/kup-8xx.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/powerpc/include/asm/nohash/32/kup-8xx.h b/arch/powerpc/include/asm/nohash/32/kup-8xx.h
index c44d97751723..8579210f2a6a 100644
--- a/arch/powerpc/include/asm/nohash/32/kup-8xx.h
+++ b/arch/powerpc/include/asm/nohash/32/kup-8xx.h
@@ -41,14 +41,10 @@ static inline void __kuap_kernel_restore(struct pt_regs *regs, unsigned long kua
static inline unsigned long __kuap_get_and_assert_locked(void)
{
- unsigned long kuap;
-
- kuap = mfspr(SPRN_MD_AP);
-
if (IS_ENABLED(CONFIG_PPC_KUAP_DEBUG))
- WARN_ON_ONCE(kuap >> 16 != MD_APG_KUAP >> 16);
+ WARN_ON_ONCE(mfspr(SPRN_MD_AP) >> 16 != MD_APG_KUAP >> 16);
- return kuap;
+ return 0;
}
static inline void __allow_user_access(void __user *to, const void __user *from,