linux-mips
[Top] [All Lists]

Re: COP2 unaligned -> SIGBUS

To: Mikael Starvik <mikael.starvik@axis.com>
Subject: Re: COP2 unaligned -> SIGBUS
From: Ralf Baechle <ralf@linux-mips.org>
Date: Mon, 23 Nov 2009 11:56:19 +0000
Cc: "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>, David Daney <ddaney@caviumnetworks.com>
In-reply-to: <20091123113820.GA4217@linux-mips.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <4BEA3FF3CAA35E408EA55C7BE2E61D0546A5E6F9DC@xmail3.se.axis.com> <20091123113820.GA4217@linux-mips.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.19 (2009-01-05)
On Mon, Nov 23, 2009 at 11:38:20AM +0000, Ralf Baechle wrote:

> > Since there are now at least two users of cop2 I propose the following:
> 
> Yes, the comment is not quite correct.  CP2 has always been available for
> application specific extensions and a few imlementations have made use of
> that.  I'll update the comment.  Oh and the Praystation has a TLB.

On 2nd thought - there is one user of CU2 in the kernel - the Cavium support.

Nothing else in the stock Linux/MIPS kernel will ever enable c0_status.cu2,
so the attempt to execute a CP2 load or store instruction would result in a
Coprocessor Unusable exception which whould result in a SIGILL being
delivered to the offending process.  On Cavium the instructions COP2 is
documented to not deliver any exceptions so there isn't really anything
that would need to be changed.

David - I think we should try to get rid of the processor specifics from
this core code so probably having notifiers to run on Address Error or
Coprocessor Unusable exceptions would be a solution?  I also want to get
rid of the Cavium #ifdef from traps.c.

  Ralf

<Prev in Thread] Current Thread [Next in Thread>