Received: from milmhbs1.lsil.com (147.145.21.209) by coscas01.lsi.com
 (172.21.36.60) with Microsoft SMTP Server id 8.1.393.1; Wed, 2 Dec 2009
 04:39:51 -0700
Received: from mail1.lsil.com (mail1.lsil.com [147.145.40.21])	by
 milmhbs1.lsil.com (8.12.11/8.12.11) with ESMTP id nB2Bdosp027548	for
 <andy.sharp@lsi.com>; Wed, 2 Dec 2009 03:39:51 -0800
Received: from psmtp.com (na3sys009amx215.postini.com [74.125.149.55])	by
 mail1.lsil.com (8.12.11/8.12.11) with SMTP id nB2Bdcld027044	for
 <andy.sharp@lsi.com>; Wed, 2 Dec 2009 03:39:49 -0800 (PST)
Received: from source ([78.24.191.182]) by na3sys009amx215.postini.com
 ([74.125.148.14]) with SMTP;	Wed, 02 Dec 2009 03:39:50 PST
Received: from localhost.localdomain ([127.0.0.1]:50816 "EHLO
        eddie.linux-mips.org" rhost-flags-OK-OK-OK-FAIL)        by
 eddie.linux-mips.org with ESMTP id S1492499AbZLBLjT (ORCPT
        <rfc822;andy.sharp@lsi.com>); Wed, 2 Dec 2009 12:39:19 +0100
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 02 Dec 2009 12:39:02
 +0100 (CET)
Received: from h5.dl5rb.org.uk ([81.2.74.5]:55998 "EHLO h5.dl5rb.org.uk"
        rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP        id
 S1492497AbZLBLi7 (ORCPT <rfc822;linux-mips@linux-mips.org>);        Wed, 2
 Dec 2009 12:38:59 +0100
Received: from h5.dl5rb.org.uk (localhost.localdomain [127.0.0.1])        by
 h5.dl5rb.org.uk (8.14.3/8.14.3) with ESMTP id nB2BcvSM001880        for
 <linux-mips@linux-mips.org>; Wed, 2 Dec 2009 11:38:57 GMT
Received: (from ralf@localhost)        by h5.dl5rb.org.uk
 (8.14.3/8.14.3/Submit) id nB2BcuCQ001821        for
 linux-mips@linux-mips.org; Wed, 2 Dec 2009 11:38:56 GMT
From: Ralf Baechle <ralf@linux-mips.org>
To: "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>
Sender: "linux-mips-bounce@linux-mips.org" <linux-mips-bounce@linux-mips.org>
Date: Wed, 2 Dec 2009 04:38:55 -0700
Subject: [PATCH] MIPS: Fix MIPS I build.
Thread-Topic: [PATCH] MIPS: Fix MIPS I build.
Thread-Index: AcpzRCkMRLvY1DpaRtWNhXjo3BKdHA==
Message-ID: <20091202113855.GA32256@linux-mips.org>
Accept-Language: en-US
Content-Language: en-US
X-MS-Exchange-Organization-AuthAs: Anonymous
X-MS-Exchange-Organization-AuthSource: coscas01.lsi.com
X-MS-Has-Attach:
X-Auto-Response-Suppress: All
X-MS-TNEF-Correlator:
x-scanned-by: MIMEDefang 2.39
errors-to: linux-mips-bounce@linux-mips.org
x-pstn-levels: (S:99.90000/99.90000 CV:99.9000 FC:95.5390 LC:95.5390
 R:95.9108 P:95.9108 M:97.0282 C:98.6951 )
x-pstn-settings: 3 (1.0000:1.0000) s cv gt3 gt2 gt1 r p m c 
x-pstn-addresses: from <ralf@linux-mips.org> [22/1] 
x-pstn-neptune: 1/1/1.00/75
user-agent: Mutt/1.5.20 (2009-08-17)
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0

Broken by d63c63e889bbeeaa461a8addf1245f89f3ce4ece (lmo) rsp.
f1e39a4a616cd9981a9decfd5332fd07a01abb8b (kernel.org).

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c
index 3fe1fcf..fe0d798 100644
--- a/arch/mips/kernel/syscall.c
+++ b/arch/mips/kernel/syscall.c
@@ -306,6 +306,7 @@ static inline int mips_atomic_set(struct pt_regs *regs,
=20
 	if (cpu_has_llsc && R10000_LLSC_WAR) {
 		__asm__ __volatile__ (
+		"	.set	mips3					\n"
 		"	li	%[err], 0				\n"
 		"1:	ll	%[old], (%[addr])			\n"
 		"	move	%[tmp], %[new]				\n"
@@ -320,6 +321,7 @@ static inline int mips_atomic_set(struct pt_regs *regs,
 		"	"STR(PTR)"	1b, 4b				\n"
 		"	"STR(PTR)"	2b, 4b				\n"
 		"	.previous					\n"
+		"	.set	mips0					\n"
 		: [old] "=3D&r" (old),
 		  [err] "=3D&r" (err),
 		  [tmp] "=3D&r" (tmp)
@@ -329,6 +331,7 @@ static inline int mips_atomic_set(struct pt_regs *regs,
 		: "memory");
 	} else if (cpu_has_llsc) {
 		__asm__ __volatile__ (
+		"	.set	mips3					\n"
 		"	li	%[err], 0				\n"
 		"1:	ll	%[old], (%[addr])			\n"
 		"	move	%[tmp], %[new]				\n"
@@ -347,6 +350,7 @@ static inline int mips_atomic_set(struct pt_regs *regs,
 		"	"STR(PTR)"	1b, 5b				\n"
 		"	"STR(PTR)"	2b, 5b				\n"
 		"	.previous					\n"
+		"	.set	mips0					\n"
 		: [old] "=3D&r" (old),
 		  [err] "=3D&r" (err),
 		  [tmp] "=3D&r" (tmp)

