Skip to contentSkip to conversation

powerpc: system call micro optimisation

PATCH In review Anton Blanchard 2 participants 2 messages Jun 10, 2006 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: system call micro optimisation

In the syscall path we currently have:

crclr so
mfcr r9

If we shift the crclr up we can avoid a stall on some CPUs.

---

arch/powerpc/kernel/entry_64.S +1 -1
Index: kernel/arch/powerpc/kernel/entry_64.S
===================================================================
@@ -59,6 +59,7 @@ system_call_common:
 	beq-	1f
 	ld	r1,PACAKSAVE(r13)
 1:	std	r10,0(r1)
+	crclr	so
 	std	r11,_NIP(r1)
 	std	r12,_MSR(r1)
 	std	r0,GPR0(r1)
@@ -77,7 +78,6 @@ system_call_common:
 	std	r11,GPR11(r1)
 	std	r11,GPR12(r1)
 	std	r9,GPR13(r1)
-	crclr	so
 	mfcr	r9
 	mflr	r10
 	li	r11,0xc01
#1 lore raw
Quoted 6 lines · Anton Blanchard

In the syscall path we currently have:

crclr so
mfcr r9

If we shift the crclr up we can avoid a stall on some CPUs.

Can you maybe have a quick look at the vDSO's ? They might have similar room for optimisations...

Cheers,
Ben.

Quoted 27 lines

---

Index: kernel/arch/powerpc/kernel/entry_64.S
===================================================================

arch/powerpc/kernel/entry_64.S +1 -1
@@ -59,6 +59,7 @@ system_call_common:
 	beq-	1f
 	ld	r1,PACAKSAVE(r13)
 1:	std	r10,0(r1)
+	crclr	so
 	std	r11,_NIP(r1)
 	std	r12,_MSR(r1)
 	std	r0,GPR0(r1)
@@ -77,7 +78,6 @@ system_call_common:
 	std	r11,GPR11(r1)
 	std	r11,GPR12(r1)
 	std	r9,GPR13(r1)
-	crclr	so
 	mfcr	r9
 	mflr	r10
 	li	r11,0xc01

_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev