From: Ralf Baechle <ralf@linux-mips.org>
To: Joshua Kinard <kumba@gentoo.org>
Cc: "Maciej W. Rozycki" <macro@linux-mips.org>,
Linux MIPS List <linux-mips@linux-mips.org>
Subject: Re: IP27: R14000: Unexpected General Exception in cpu_set_fpu_fcsr_mask()
Date: Tue, 2 Jun 2015 08:51:23 +0200 [thread overview]
Message-ID: <20150602065122.GE26432@linux-mips.org> (raw)
In-Reply-To: <556D378C.8060503@gentoo.org>
On Tue, Jun 02, 2015 at 12:56:44AM -0400, Joshua Kinard wrote:
> >>> I'll submit the final fix, properly annotated, if your testing confirms
> >>> my diagnosis.
> >>
> >> That got it to boot again. I added CPU ID to the printk as well, and got some
> >> odd output from one of the CPUs:
> >>
> >> # dmesg | grep FCSR
> >> [ 0.000000] CPU0: FCSR is: 00000000
> >> [ 0.319158] CPU1: FCSR is: 00000000
> >> [ 0.364971] CPU2: FCSR is: ffffffffa8000000
> >> [ 0.404854] CPU3: FCSR is: 00000000
> >
> > The value reported for CPU2 merely shows FCC[7,5,3] bits set, nothing
> > really odd about that, the CPU may well have come out of reset like this.
> > Neither of the values reported though actually corresponds to the symptom
> > you saw, can you double-check you didn't make a typo in your modification
> > to `printk'?
>
> I commented on it being odd because out of four CPUs, #2 was coming up with a
> sign-extended value, twice (I tested two reboot cycles, same both times). I'm
> not fully knowledgable of IP27 hardware, and am probably one of the few on the
> planet in possession of R14K node boards, so this might be a quirk of these
> specific nodes. Would need others to test to verify, I guess.
>
> Could always turn on heavy diags and poke through the verbose MSC reporting if
> needed.
>
> As for a typo, nope:
>
> __enable_fpu(FPU_AS_IS);
>
> fcsr = read_32bit_cp1_register(CP1_STATUS);
> -> pr_info("CPU%d: FCSR is: %08lx\n", smp_processor_id(), fcsr);
> fcsr &= ~mask;
Maciej, I think the variables sr, mask, fcsr, fcsr0 and fcsr1 should
become unsigned ints; they all represent 32 bit CPU registers. Also
read_32bit_cp1_register() return a signed int. A signed int probably
would make more sense here.
Ralf
next prev parent reply other threads:[~2015-06-02 6:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-30 5:00 IP27: R14000: Unexpected General Exception in cpu_set_fpu_fcsr_mask() Joshua Kinard
2015-06-01 0:09 ` Maciej W. Rozycki
2015-06-01 2:57 ` Joshua Kinard
2015-06-01 11:27 ` Maciej W. Rozycki
2015-06-01 20:16 ` Ralf Baechle
2015-06-02 4:56 ` Joshua Kinard
2015-06-02 6:51 ` Ralf Baechle [this message]
2015-06-02 11:42 ` Maciej W. Rozycki
2015-06-02 11:32 ` Maciej W. Rozycki
2015-06-02 18:56 ` Joshua Kinard
2015-06-02 18:56 ` Joshua Kinard
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=20150602065122.GE26432@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=kumba@gentoo.org \
--cc=linux-mips@linux-mips.org \
--cc=macro@linux-mips.org \
/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