linux-mips
[Top] [All Lists]

Re: [PATCH 2/5] MIPS: Allow kernel to use coprocessor 2

To: Jayachandran C <jchandra@broadcom.com>
Subject: Re: [PATCH 2/5] MIPS: Allow kernel to use coprocessor 2
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Mon, 10 Jun 2013 15:31:12 +0400
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org, ddaney.cavm@gmail.com
In-reply-to: <1370849404-4918-3-git-send-email-jchandra@broadcom.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1370849404-4918-1-git-send-email-jchandra@broadcom.com> <1370849404-4918-3-git-send-email-jchandra@broadcom.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6
On 10.06.2013 11:30, Jayachandran C wrote:

Kernel threads should be able to use COP2 if the platform needs it.
Do not call die_if_kernel() for a coprocessor unusable exception if
the exception due to COP2 usage.  Instead, the default notifier for
COP2 exceptions is updated to call die_if_kernel.

Signed-off-by: Jayachandran C <jchandra@broadcom.com>
---
  arch/mips/kernel/traps.c |   15 +++++----------
  1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index beba1e6..142d2be 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -1056,15 +1056,9 @@ static int default_cu2_call(struct notifier_block *nfb, 
unsigned long action,
  {
        struct pt_regs *regs = data;

-       switch (action) {
-       default:
-               die_if_kernel("Unhandled kernel unaligned access or invalid "
+       die_if_kernel("COP2: Unhandled kernel unaligned access or invalid "
                              "instruction", regs);

Do not wrap the message please -- it's useful for grepping. checkpatch.pl shouldn't complain about the line length.

WBR, Sergei


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