aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/head_8xx.S
diff options
context:
space:
mode:
authorJoakim Tjernlund <joakim.tjernlund@transmode.se>2009-12-29 00:10:58 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-01-14 21:20:07 -0500
commit9f4f04ba2b117a5c741d019629d7ffccdc621122 (patch)
tree3a96a7c0263b01b4706a665e9d9cbfc76d3f7011 /arch/powerpc/kernel/head_8xx.S
parent004b35063296b6772fa72404a35b498f1e71e87e (diff)
powerpc/8xx: Always pin kernel instruction TLB
Various kernel asm modifies SRR0/SRR1 just before executing a rfi. If such code crosses a page boundary you risk a TLB miss which will clobber SRR0/SRR1. Avoid this by always pinning kernel instruction TLB space. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/head_8xx.S')
-rw-r--r--arch/powerpc/kernel/head_8xx.S8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S
index 678f98cd5e64..a2ed3422fa3d 100644
--- a/arch/powerpc/kernel/head_8xx.S
+++ b/arch/powerpc/kernel/head_8xx.S
@@ -768,12 +768,12 @@ start_here:
768 */ 768 */
769initial_mmu: 769initial_mmu:
770 tlbia /* Invalidate all TLB entries */ 770 tlbia /* Invalidate all TLB entries */
771#ifdef CONFIG_PIN_TLB 771/* Always pin the first 8 MB ITLB to prevent ITLB
772 misses while mucking around with SRR0/SRR1 in asm
773*/
772 lis r8, MI_RSV4I@h 774 lis r8, MI_RSV4I@h
773 ori r8, r8, 0x1c00 775 ori r8, r8, 0x1c00
774#else 776
775 li r8, 0
776#endif
777 mtspr SPRN_MI_CTR, r8 /* Set instruction MMU control */ 777 mtspr SPRN_MI_CTR, r8 /* Set instruction MMU control */
778 778
779#ifdef CONFIG_PIN_TLB 779#ifdef CONFIG_PIN_TLB