From 5b4a83cdfbe4bcdaa85bea1c00a62c9af8a853bc Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Sun, 30 Nov 2008 11:49:45 +0000 Subject: [PATCH] --- yaml --- r: 119471 b: refs/heads/master c: ab598b6680f1e74c267d1547ee352f3e1e530f89 h: refs/heads/master i: 119469: b8cc5b60ddfbdb92e8121d284911a05dde195ad4 119467: 3e92b6e51a0dcd53c08a7b9e2906038972df4cde 119463: 78b31d54ebf7dcbe17232cc842577c295a87670c 119455: a80854b6716f32cd0705fb846b86e0ba9cd56aad v: v3 --- [refs] | 2 +- trunk/arch/powerpc/kernel/entry_64.S | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 80c1d35083b9..917bc84fde7d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 960cedb4e3eedec6394f224fc832c7a23f35a799 +refs/heads/master: ab598b6680f1e74c267d1547ee352f3e1e530f89 diff --git a/trunk/arch/powerpc/kernel/entry_64.S b/trunk/arch/powerpc/kernel/entry_64.S index e6d52845854f..e0bcf9354286 100644 --- a/trunk/arch/powerpc/kernel/entry_64.S +++ b/trunk/arch/powerpc/kernel/entry_64.S @@ -57,12 +57,18 @@ 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) std r10,GPR1(r1) ACCOUNT_CPU_USER_ENTRY(r10, r11) + /* + * This "crclr so" clears CR0.SO, which is the error indication on + * return from this system call. There must be no cmp instruction + * between it and the "mfcr r9" below, otherwise if XER.SO is set, + * CR0.SO will get set, causing all system calls to appear to fail. + */ + crclr so std r2,GPR2(r1) std r3,GPR3(r1) std r4,GPR4(r1)