[OpenBIOS] [PATCH] ppc: only clear MSR_SF when clearing high MSR bits

Alexander Graf agraf at suse.de
Fri Jun 17 01:39:58 CEST 2011


We are pretty aggressive now with how we clear the high MSR bits, clearing
all of them when we find a 64-bit CPU.

As Segher points out, this is not always a good idea though. There might
be bits set that can be crucial for operation. Hence we should only clear
MSR_SF, as that's the bit we're interested in.

Reported-by: Segher Boessenkool <segher at kernel.crashing.org>
Signed-off-by: Alexander Graf <agraf at suse.de>
---
 arch/ppc/qemu/start.S |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/ppc/qemu/start.S b/arch/ppc/qemu/start.S
index f06f6d5..aa582e2 100644
--- a/arch/ppc/qemu/start.S
+++ b/arch/ppc/qemu/start.S
@@ -44,7 +44,7 @@
 	beq	1f; \
 	\
 	mfmsr	r1 ;				/* unset MSR_SF */ \
-	clrlwi	r1,r1,0 ; \
+	clrldi	r1,r1,1 ; \
 	mtmsrd	r1 ; \
 1: \
 	mfsprg0	r1 ;				/* exception stack in sprg0 */ \
-- 
1.6.0.2




More information about the OpenBIOS mailing list