[2.4] SLB noloop patch

olof at austin.ibm.com olof at austin.ibm.com
Thu Jan 22 15:47:01 EST 2004


On Fri, 16 Jan 2004, Olof Johansson wrote:

> The 2.5 equivalent of this patch got baked into Anton's big SLB rewrite.
> There seems to be less interest to bring the bigger rewrite back to 2.4,
> but the noloop stuff is still a valuable enhancement (and smaller in scope).

Julie Dewandel found a glaring error in the previous patch. Here's an
incremental diff, I'll push it to BK in the morning. It's been tested
quite a bit for the last few days so I'm quite sure it's correct now.


-Olof

Olof Johansson                                        Office: 4E002/905
Linux on Power Development                            IBM Systems Group
Email: olof at austin.ibm.com                          Phone: 512-838-9858
All opinions are my own and not those of IBM
-------------- next part --------------
===== arch/ppc64/kernel/head.S 1.21 vs edited =====
--- 1.21/arch/ppc64/kernel/head.S	Mon Jan 19 11:23:02 2004
+++ edited/arch/ppc64/kernel/head.S	Tue Jan 20 13:36:05 2004
@@ -1225,8 +1225,9 @@
 	mulld   r20,r20,r21
 	clrldi  r20,r20,28      /* r20 = vsid */
 
-	/* No free entry - just take the next entry, round-robin */
-	/* XXX we should get the number of SLB entries from the naca */
+	/* No searching for free entries, just take the next
+	 * entry round-robin 
+	 */
 SLB_NUM_ENTRIES = 64
 2:	mfspr	r21,SPRG3
 	ld	r22,PACASTABRR(r21)
@@ -1250,17 +1251,15 @@
 	 * for the kernel stack during the first part of exception exit
 	 * which gets invalidated due to a tlbie from another cpu at a
 	 * non recoverable point (after setting srr0/1) - Anton
-	 */
-	slbmfee	r23,r22
-	srdi	r23,r23,28
-	/*
+	 *
 	 * This is incorrect (r1 is not the kernel stack) if we entered
 	 * from userspace but there is no critical window from userspace
 	 * so this should be OK. Also if we cast out the userspace stack
 	 * segment while in userspace we will fault it straight back in.
 	 */
-	srdi	r21,r1,28
-	cmpd	r21,r23
+	xor	r23,r1,r21
+	srdi	r23,r23,28
+	cmpdi	r23,0
 	beq-	2b
 	
 	/* Invalidate the old entry */


More information about the Linuxppc64-dev mailing list