From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Paul Burton <paul.burton@imgtec.com>, linux-mips@linux-mips.org
Subject: Re: [PATCH 05/11] MIPS: clear MSACSR cause bits when handling MSA FP exception
Date: Wed, 24 Sep 2014 15:10:14 +0400 [thread overview]
Message-ID: <5422A696.7080408@cogentembedded.com> (raw)
In-Reply-To: <1411551942-11153-6-git-send-email-paul.burton@imgtec.com>
Hello.
On 9/24/2014 1:45 PM, Paul Burton wrote:
> Much like for traditional scalar FP exceptions, the cause bits in the
> MSACSR register need to be cleared following an MSA FP exception.
> Without doing so the exception will simply be raised again whenever
> the kernel restores MSACSR from a tasks saved context, leading to
> undesirable spurious exceptions. Clear the cause bits from the
> handle_msa_fpe function, mirroring the way handle_fpe clears the
> cause bits in FCSR.
> Signed-off-by: Paul Burton <paul.burton@imgtec.com>
> ---
> arch/mips/kernel/genex.S | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
> diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S
> index ac35e12..ae84496 100644
> --- a/arch/mips/kernel/genex.S
> +++ b/arch/mips/kernel/genex.S
> @@ -367,6 +367,15 @@ NESTED(nmi_handler, PT_SIZE, sp)
> STI
> .endm
>
> + .macro __build_clear_msa_fpe
> + _cfcmsa a1, MSA_CSR
> + li a2, ~(0x3f << 12)
> + and a2, a1
> + _ctcmsa MSA_CSR, a1
Not a2?
> + TRACE_IRQS_ON
> + STI
> + .endm
> +
> .macro __build_clear_ade
> MFC0 t0, CP0_BADVADDR
> PTR_S t0, PT_BVADDR(sp)
WBR, Sergei
next prev parent reply other threads:[~2014-09-24 11:10 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-24 9:45 [PATCH 00/11] FP/MSA fixes Paul Burton
2014-09-24 9:45 ` Paul Burton
2014-09-24 9:45 ` [PATCH 01/11] MIPS: push .set arch=r4000 into the functions needing it Paul Burton
2014-09-24 9:45 ` Paul Burton
2014-11-11 14:19 ` Ralf Baechle
2014-09-24 9:45 ` [PATCH 02/11] MIPS: assume at as source/dest of MSA copy/insert instructions Paul Burton
2014-09-24 9:45 ` Paul Burton
2014-09-24 9:45 ` [PATCH 03/11] MIPS: remove MSA macro recursion Paul Burton
2014-09-24 9:45 ` Paul Burton
2014-09-24 9:45 ` [PATCH 04/11] MIPS: wrap cfcmsa & ctcmsa accesses for toolchains with MSA support Paul Burton
2014-09-24 9:45 ` Paul Burton
2014-09-24 12:08 ` James Hogan
2014-09-24 12:08 ` James Hogan
2014-09-25 9:23 ` Paul Burton
2014-09-25 9:23 ` Paul Burton
2014-09-25 10:24 ` James Hogan
2014-09-25 10:24 ` James Hogan
2014-09-24 9:45 ` [PATCH 05/11] MIPS: clear MSACSR cause bits when handling MSA FP exception Paul Burton
2014-09-24 9:45 ` Paul Burton
2014-09-24 11:10 ` Sergei Shtylyov [this message]
2014-09-25 9:20 ` [PATCH v2 " Paul Burton
2014-09-25 9:20 ` Paul Burton
2014-09-24 9:45 ` [PATCH 06/11] MIPS: fix mfc1 & mfhc1 emulation for mips64 systems Paul Burton
2014-09-24 9:45 ` Paul Burton
2014-09-24 9:45 ` [PATCH 07/11] MIPS: ensure FCSR cause bits are clear after invoking FPU emulator Paul Burton
2014-09-24 9:45 ` Paul Burton
2014-09-24 9:45 ` [PATCH 08/11] MIPS: prevent FP context set via ptrace being discarded Paul Burton
2014-09-24 9:45 ` Paul Burton
2014-09-24 9:45 ` [PATCH 09/11] MIPS: disable FPU if the mode is unsupported Paul Burton
2014-09-24 9:45 ` Paul Burton
2014-09-24 9:45 ` [PATCH 10/11] Revert "MIPS: Don't assume 64-bit FP registers for context switch" Paul Burton
2014-09-24 9:45 ` Paul Burton
2014-09-24 9:45 ` [PATCH 11/11] MIPS: MSA: Fix big-endian FPR_IDX implementation Paul Burton
2014-09-24 9:45 ` Paul Burton
2014-09-24 13:00 ` [PATCH 00/11] FP/MSA fixes James Hogan
2014-09-24 13:00 ` James Hogan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5422A696.7080408@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=linux-mips@linux-mips.org \
--cc=paul.burton@imgtec.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox