[PATCH 04/11] powerpc/32: add CLR_MSR_WE() in EXCEPTION_PROLOG in head_32.h

From: Christophe Leroy
Date: Mon Jan 28 2019 - 06:12:02 EST


Add CLR_MSR_WE() macro to allow 40x to clear
that bit from the register containing msr value.

This is the only difference between common EXCEPTION_PROLOG
and 40x one. This patch will allow 40x to use the common one.

Signed-off-by: Christophe Leroy <christophe.leroy@xxxxxx>
---
arch/powerpc/kernel/head_32.h | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/arch/powerpc/kernel/head_32.h b/arch/powerpc/kernel/head_32.h
index 9e6fb9d468f0..643dd8d34aac 100644
--- a/arch/powerpc/kernel/head_32.h
+++ b/arch/powerpc/kernel/head_32.h
@@ -8,6 +8,10 @@
#define SET_AND_STORE_MSR_RI(reg)
#endif

+#ifndef CLR_MSR_WE
+#define CLR_MSR_WE(reg)
+#endif
+
/*
* Exception entry code. This code runs with address translation
* turned off, i.e. using physical addresses.
@@ -49,6 +53,7 @@
stw r1,0(r11); \
tovirt(r1,r11); /* set new kernel sp */ \
SET_AND_STORE_MSR_RI(r10); /* can take exceptions */ \
+ CLR_MSR_WE(r9); \
stw r0,GPR0(r11); \
lis r10,STACK_FRAME_REGS_MARKER@ha; /* exception frame marker */ \
addi r10,r10,STACK_FRAME_REGS_MARKER@l; \
--
2.13.3