diff mbox

[4/4] powerpc: No need to preserve count register across system call

Message ID 20120405142639.237dde63@kryten (mailing list archive)
State Accepted, archived
Delegated to: Benjamin Herrenschmidt
Headers show

Commit Message

Anton Blanchard April 5, 2012, 4:26 a.m. UTC
The count register is volatile so we don't need to preserve it.
Store zero to the entry in the exception frame.

Signed-off-by: Anton Blanchard <anton@samba.org>
---
diff mbox

Patch

Index: linux-build/arch/powerpc/kernel/entry_64.S
===================================================================
--- linux-build.orig/arch/powerpc/kernel/entry_64.S	2012-03-22 22:47:15.023504471 +1100
+++ linux-build/arch/powerpc/kernel/entry_64.S	2012-03-22 22:47:17.899556262 +1100
@@ -77,6 +77,7 @@  system_call_common:
 	std	r11,GPR11(r1)
 	std	r11,GPR12(r1)
 	std	r11,_XER(r1)
+	std	r11,_CTR(r1)
 	std	r9,GPR13(r1)
 	mflr	r10
 	li	r11,0xc01
@@ -87,8 +88,6 @@  system_call_common:
 	rlwinm	r2,r2,0,4,2
 	std	r10,_LINK(r1)
 	std	r11,_TRAP(r1)
-	mfctr	r10
-	std	r10,_CTR(r1)
 	std	r3,ORIG_GPR3(r1)
 	std	r2,_CCR(r1)
 	ld	r2,PACATOC(r13)