[3/5] powerpc/book3e-64: Wait til generic_calibrate_decr to enable decrementer

Message ID 1250658513-13009-3-git-send-email-galak@kernel.crashing.org
State Accepted, archived
Commit 6c188829d2c20a1d02aedb13db34b3ca2a8f0dc4
Delegated to: Benjamin Herrenschmidt
Headers show

Commit Message

Kumar Gala Aug. 19, 2009, 5:08 a.m.
Match what we do on 32-bit Book-E processors and enable the decrementer
in generic_calibrate_decr.  We need to make sure we disable the
decrementer early in boot since we currently use lazy (soft) interrupt
on 64-bit Book-E and possible get a decrementer exception before we
are ready for it.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
 arch/powerpc/kernel/exceptions-64e.S |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)


diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S
index 695d484..3611b0e 100644
--- a/arch/powerpc/kernel/exceptions-64e.S
+++ b/arch/powerpc/kernel/exceptions-64e.S
@@ -774,9 +774,11 @@  _STATIC(init_thread_book3e)
 	/* Make sure interrupts are off */
 	wrteei	0
-	/* disable watchdog and FIT and enable DEC interrupts */
-	lis	r3,TCR_DIE@h
+	/* disable all timers and clear out status */
+	li	r3,0
 	mtspr	SPRN_TCR,r3
+	mfspr	r3,SPRN_TSR
+	mtspr	SPRN_TSR,r3