summaryrefslogtreecommitdiffstats
path: root/include/asm-ppc64/processor.h
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2005-07-07 17:56:12 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-07 18:23:37 -0700
commit8dc4fd87f229414fc38648508aad7def2275fe81 (patch)
tree4b9d330f855627807b4d7eab0b888bcb30403b32 /include/asm-ppc64/processor.h
parenta2f7a9ce2a5c3d21cc0eb37a03da603b44ba4b09 (diff)
downloadop-kernel-dev-8dc4fd87f229414fc38648508aad7def2275fe81.zip
op-kernel-dev-8dc4fd87f229414fc38648508aad7def2275fe81.tar.gz
[PATCH] ppc64: Turn runlatch on in exception entry
Enable the runlatch at the start of each exception. Unfortunately we are out of space in the 0x300 handler, so I added it a bit later. The SPR write is fairly expensive, perhaps we should cache the runlatch state in the paca and avoid the write when possible. We don't need to turn the runlatch off, we do that in the idle loop. Better to take the hit in the idle loop than for each exception exit. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-ppc64/processor.h')
-rw-r--r--include/asm-ppc64/processor.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/asm-ppc64/processor.h b/include/asm-ppc64/processor.h
index 06aa07c..352306c 100644
--- a/include/asm-ppc64/processor.h
+++ b/include/asm-ppc64/processor.h
@@ -524,6 +524,15 @@ static inline void ppc64_runlatch_off(void)
#endif /* __ASSEMBLY__ */
+#ifdef __KERNEL__
+#define RUNLATCH_ON(REG) \
+BEGIN_FTR_SECTION \
+ mfspr (REG),SPRN_CTRLF; \
+ ori (REG),(REG),CTRL_RUNLATCH; \
+ mtspr SPRN_CTRLT,(REG); \
+END_FTR_SECTION_IFSET(CPU_FTR_CTRL)
+#endif
+
/*
* Number of entries in the SLB. If this ever changes we should handle
* it with a use a cpu feature fixup.
OpenPOWER on IntegriCloud