aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/tlb_nohash_low.S
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-07-23 19:15:47 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-08-19 20:25:09 -0400
commit25d21ad6e799cccd097b9df2a2fefe19a7e1dfcf (patch)
treecd381527a069fed6cffa8755cac177639cc48b0b /arch/powerpc/mm/tlb_nohash_low.S
parenta8f7758c1c52a13e031266483efd5525157e43e9 (diff)
powerpc: Add TLB management code for 64-bit Book3E
This adds the TLB miss handler assembly, the low level TLB flush routines along with the necessary hook for dealing with our virtual page tables or indirect TLB entries that need to be flushes when PTE pages are freed. There is currently no support for hugetlbfs Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/mm/tlb_nohash_low.S')
-rw-r--r--arch/powerpc/mm/tlb_nohash_low.S79
1 files changed, 79 insertions, 0 deletions
diff --git a/arch/powerpc/mm/tlb_nohash_low.S b/arch/powerpc/mm/tlb_nohash_low.S
index c7d89a0adba2..7bcd9fbf6cc6 100644
--- a/arch/powerpc/mm/tlb_nohash_low.S
+++ b/arch/powerpc/mm/tlb_nohash_low.S
@@ -191,6 +191,85 @@ ALT_MMU_FTR_SECTION_END_IFCLR(MMU_FTR_USE_TLBILX)
191 isync 191 isync
1921: wrtee r10 1921: wrtee r10
193 blr 193 blr
194#elif defined(CONFIG_PPC_BOOK3E)
195/*
196 * New Book3E (>= 2.06) implementation
197 *
198 * Note: We may be able to get away without the interrupt masking stuff
199 * if we save/restore MAS6 on exceptions that might modify it
200 */
201_GLOBAL(_tlbil_pid)
202 slwi r4,r3,MAS6_SPID_SHIFT
203 mfmsr r10
204 wrteei 0
205 mtspr SPRN_MAS6,r4
206 PPC_TLBILX_PID(0,0)
207 wrtee r10
208 msync
209 isync
210 blr
211
212_GLOBAL(_tlbil_pid_noind)
213 slwi r4,r3,MAS6_SPID_SHIFT
214 mfmsr r10
215 ori r4,r4,MAS6_SIND
216 wrteei 0
217 mtspr SPRN_MAS6,r4
218 PPC_TLBILX_PID(0,0)
219 wrtee r10
220 msync
221 isync
222 blr
223
224_GLOBAL(_tlbil_all)
225 PPC_TLBILX_ALL(0,0)
226 msync
227 isync
228 blr
229
230_GLOBAL(_tlbil_va)
231 mfmsr r10
232 wrteei 0
233 cmpwi cr0,r6,0
234 slwi r4,r4,MAS6_SPID_SHIFT
235 rlwimi r4,r5,MAS6_ISIZE_SHIFT,MAS6_ISIZE_MASK
236 beq 1f
237 rlwimi r4,r6,MAS6_SIND_SHIFT,MAS6_SIND
2381: mtspr SPRN_MAS6,r4 /* assume AS=0 for now */
239 PPC_TLBILX_VA(0,r3)
240 msync
241 isync
242 wrtee r10
243 blr
244
245_GLOBAL(_tlbivax_bcast)
246 mfmsr r10
247 wrteei 0
248 cmpwi cr0,r6,0
249 slwi r4,r4,MAS6_SPID_SHIFT
250 rlwimi r4,r5,MAS6_ISIZE_SHIFT,MAS6_ISIZE_MASK
251 beq 1f
252 rlwimi r4,r6,MAS6_SIND_SHIFT,MAS6_SIND
2531: mtspr SPRN_MAS6,r4 /* assume AS=0 for now */
254 PPC_TLBIVAX(0,r3)
255 eieio
256 tlbsync
257 sync
258 wrtee r10
259 blr
260
261_GLOBAL(set_context)
262#ifdef CONFIG_BDI_SWITCH
263 /* Context switch the PTE pointer for the Abatron BDI2000.
264 * The PGDIR is the second parameter.
265 */
266 lis r5, abatron_pteptrs@h
267 ori r5, r5, abatron_pteptrs@l
268 stw r4, 0x4(r5)
269#endif
270 mtspr SPRN_PID,r3
271 isync /* Force context change */
272 blr
194#else 273#else
195#error Unsupported processor type ! 274#error Unsupported processor type !
196#endif 275#endif