From patchwork Fri Mar 12 23:16:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Lynch X-Patchwork-Id: 47705 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 7C909B7FB1 for ; Sat, 13 Mar 2010 10:21:52 +1100 (EST) X-Greylist: delayed 333 seconds by postgrey-1.32 at bilbo; Sat, 13 Mar 2010 10:21:45 EST Received: from sasl.smtp.pobox.com (a-pb-sasl-quonix.pobox.com [208.72.237.25]) by ozlabs.org (Postfix) with ESMTP id 672B4B7D4D for ; Sat, 13 Mar 2010 10:21:45 +1100 (EST) Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id E0FD7A1CA2; Fri, 12 Mar 2010 18:16:05 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:date:message-id; s=sasl; bh=CeflFTVz0JN34HByoynDrpAPSNE =; b=Icl8BY8+4w1R3Qov6xavvuMfJEThflAAoq0iKgUwjVn+mQsFOJPpZjK+d+O Ki0cVMCX1roXiH/50TxEVfikm1z1Fd9i8zSJmcCLkGXoQDOrAAKtNJ8OhjGHUVuL s8lIkopOae6AwkD+S6rsNHtta9uYZizknkYNrEYNIzBDQdxc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:date:message-id; q=dns; s=sasl; b=bJ33sNfM0KTjDTnaM4LSx x1utUkaVt1bnglDEt7DThuOrIemv5sFNmBBbDEdeyIs/pIIFphgf0AxU+6+OyHKz tebN/tyXZX0YtzXUrqYK0teKJWZ8ycWIqYAs/eG2s+pLlibtINJg9ZbZR3s3gZ7N /gLXN4fFyGUKuR4K7A8ppo= Received: from a-pb-sasl-quonix. (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id CF152A1CA0; Fri, 12 Mar 2010 18:16:04 -0500 (EST) Received: from localhost.localdomain (unknown [70.113.201.126]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 6F4D0A1C9C; Fri, 12 Mar 2010 18:16:03 -0500 (EST) From: Nathan Lynch To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH] use correct ccr bit for syscall error status Date: Fri, 12 Mar 2010 17:16:02 -0600 Message-Id: <1268435762-25788-1-git-send-email-ntl@pobox.com> X-Mailer: git-send-email 1.6.2.5 X-Pobox-Relay-ID: 3B54557A-2E2D-11DF-AD9A-D033EE7EF46B-04752483!a-pb-sasl-quonix.pobox.com X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org The powerpc implementations of syscall_get_error and syscall_set_return_value should use CCR0:S0 (0x10000000) for testing and setting syscall error status. Fortunately these APIs don't seem to be used at the moment. Signed-off-by: Nathan Lynch --- arch/powerpc/include/asm/syscall.h | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/syscall.h b/arch/powerpc/include/asm/syscall.h index efa7f0b..23913e9 100644 --- a/arch/powerpc/include/asm/syscall.h +++ b/arch/powerpc/include/asm/syscall.h @@ -30,7 +30,7 @@ static inline void syscall_rollback(struct task_struct *task, static inline long syscall_get_error(struct task_struct *task, struct pt_regs *regs) { - return (regs->ccr & 0x1000) ? -regs->gpr[3] : 0; + return (regs->ccr & 0x10000000) ? -regs->gpr[3] : 0; } static inline long syscall_get_return_value(struct task_struct *task, @@ -44,10 +44,10 @@ static inline void syscall_set_return_value(struct task_struct *task, int error, long val) { if (error) { - regs->ccr |= 0x1000L; + regs->ccr |= 0x10000000L; regs->gpr[3] = -error; } else { - regs->ccr &= ~0x1000L; + regs->ccr &= ~0x10000000L; regs->gpr[3] = val; } }