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; Sun, 22 Nov 2009
 23:32:30 -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 nAN6WN2V019274	for
 <andy.sharp@lsi.com>; Sun, 22 Nov 2009 22:32:26 -0800
Received: from psmtp.com (na3sys009amx220.postini.com [74.125.149.60])	by
 mail1.lsil.com (8.12.11/8.12.11) with SMTP id nAN6WHRN012539	for
 <andy.sharp@lsi.com>; Sun, 22 Nov 2009 22:32:22 -0800 (PST)
Received: from source ([78.24.191.182]) by na3sys009amx220.postini.com
 ([74.125.148.14]) with SMTP;	Sun, 22 Nov 2009 22:32:23 PST
Received: from localhost.localdomain ([127.0.0.1]:47109 "EHLO
	eddie.linux-mips.org" rhost-flags-OK-OK-OK-FAIL) by ftp.linux-mips.org	with
 ESMTP id S1492138AbZKWGcB (ORCPT <rfc822;andy.sharp@lsi.com>);	Mon, 23 Nov
 2009 07:32:01 +0100
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 23 Nov 2009 07:31:44
 +0100 (CET)
Received: from krynn.se.axis.com ([193.13.178.10]:39864 "EHLO
	krynn.se.axis.com" rhost-flags-OK-OK-OK-OK) by ftp.linux-mips.org	with ESMTP
 id S1492129AbZKWGbh convert rfc822-to-8bit (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Mon, 23 Nov 2009 07:31:37 +0100
Received: from xmail3.se.axis.com (xmail3.se.axis.com [10.0.5.75])	by
 krynn.se.axis.com (8.14.3/8.14.3/Debian-5) with ESMTP id nAN6VUuE031106	for
 <linux-mips@linux-mips.org>; Mon, 23 Nov 2009 07:31:30 +0100
Received: from xmail3.se.axis.com ([10.0.5.75]) by xmail3.se.axis.com
 ([10.0.5.75]) with mapi; Mon, 23 Nov 2009 07:31:30 +0100
From: Mikael Starvik <mikael.starvik@axis.com>
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: Sun, 22 Nov 2009 23:31:28 -0700
Subject: COP2 unaligned -> SIGBUS
Thread-Topic: COP2 unaligned -> SIGBUS
Thread-Index: AcpsBpbSFxv5b1bcRcijCkkfZ+dzaw==
Message-ID: <4BEA3FF3CAA35E408EA55C7BE2E61D0546A5E6F9DC@xmail3.se.axis.com>
Accept-Language: sv-SE
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:
acceptlanguage: sv-SE
x-scanned-by: MIMEDefang 2.39
errors-to: linux-mips-bounce@linux-mips.org
x-pstn-levels: (S:90.71507/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 <mikael.starvik@axis.com> [22/1] 
x-pstn-neptune: 0/0/0.00/0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0

Since there are now at least two users of cop2 I propose the following:

Regards
/Mikael

Index: unaligned.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /usr/local/cvs/linux/os/linux-2.6/arch/mips/kernel/unaligned.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- unaligned.c	15 Jun 2009 16:00:57 -0000	1.12
+++ unaligned.c	23 Nov 2009 06:26:04 -0000	1.13
@@ -446,22 +446,15 @@
 	case ldc1_op:
 	case swc1_op:
 	case sdc1_op:
-		/*
-		 * I herewith declare: this does not happen.  So send SIGBUS.
-		 */
-		goto sigbus;
-
 	case lwc2_op:
 	case ldc2_op:
 	case swc2_op:
 	case sdc2_op:
 		/*
-		 * These are the coprocessor 2 load/stores.  The current
-		 * implementations don't use cp2 and cp2 should always be
-		 * disabled in c0_status.  So send SIGILL.
-                 * (No longer true: The Sony Praystation uses cp2 for
-                 * 3D matrix operations.  Dunno if that thingy has a MMU .=
..)
+		 * I herewith declare: this does not happen.  So send SIGBUS.
 		 */
+		goto sigbus;
+
 	default:
 		/*
 		 * Pheeee...  We encountered an yet unknown instruction or



