From: Michael Neuling <mikey@neuling.org>
To: Jack Miller <jack@codezen.org>
Cc: Anton Blanchard <anton@samba.org>,
linuxppc-dev@lists.ozlabs.org, michael@ozlabs.au.ibm.com
Subject: Re: [PATCH 1/3] powerpc: Complete FSCR context switch
Date: Fri, 15 Apr 2016 09:11:42 +1000 [thread overview]
Message-ID: <1460675502.23123.4.camel@neuling.org> (raw)
In-Reply-To: <CAGXwabSNfXNPZ1-N9f0MnNRVbarHYQY2bfvCsnvGbbQDE4qTRQ@mail.gmail.com>
On Thu, 2016-04-14 at 13:39 -0500, Jack Miller wrote:
> > I'm not sure that works on processes before power8.
> >=20
> > There DSCR SPR number 0x11 will always trap and emulate from userspace
> > (see arch/powerpc/kernel/traps.c:emulate_instruction()). That is not
> > controlled by FSCR and should work on POWER7 where FSCR is not
> > present. We need to set the inherit bit there too.
> >=20
> > DSCR SPR number 0x3 is controlled by fscr, but it's only avaliable on
> > POWER8.
> >=20
> > > Right now the FSCR switch is conditional on FTR_ARCH_207S which is
> > > more exclusive than FTR_DSCR, but I guess the actual FSCR register is
> > > universal to PPC64 like the fscr field in the thread struct? If so, I
> > > can just move the FSCR save/restore out of the 207 conditional.
> >=20
> > FSCR was only introduced in power8, so it needs to be 207 conditional
> >=20
>=20
> So on P6/P7 (which have FTR_DSCR) set we're potentially mtspr'ing to a
> non-existent register? Yuck. Can at least strip that logic out thanks
> to the full context switch, I think, even if dscr_inherit actually has
> a use.
Yeah, welcome to DSCR... it's horrible. :-(
It's not actually non-existent. It's just OS only privileged.
Not that that makes much difference, as we still trap and emulate (and
set the inherent bit).
Mikey
next prev parent reply other threads:[~2016-04-14 23:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-11 18:57 [RFC] P9 ldmx support Jack Miller
2016-04-11 18:57 ` [PATCH 1/3] powerpc: Complete FSCR context switch Jack Miller
2016-04-12 23:42 ` [1/3] " Michael Ellerman
2016-04-13 10:51 ` [PATCH 1/3] " Anton Blanchard
2016-04-13 17:52 ` Jack Miller
2016-04-13 23:49 ` Michael Neuling
2016-04-14 18:39 ` Jack Miller
2016-04-14 23:11 ` Michael Neuling [this message]
2016-04-11 18:57 ` [PATCH 2/3] powerpc: Load Monitor Register Support Jack Miller
2016-04-12 5:40 ` Segher Boessenkool
2016-04-13 17:39 ` Jack Miller
2016-04-11 18:57 ` [PATCH 3/3] powerpc: Load Monitor Register Tests Jack Miller
2016-04-15 10:34 ` Madhavan Srinivasan
2016-04-12 1:05 ` [RFC] P9 ldmx support Michael Neuling
-- strict thread matches above, loose matches on Subject: below --
2016-04-18 19:07 [v2] " Jack Miller
2016-04-18 19:08 ` [PATCH 1/3] powerpc: Complete FSCR context switch Jack Miller
2016-04-18 20:47 [PATCH 2/3] powerpc: Load Monitor Register Support kbuild test robot
2016-04-18 21:08 ` [v3] P9 ldmx support Jack Miller
2016-04-18 21:08 ` [PATCH 1/3] powerpc: Complete FSCR context switch Jack Miller
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=1460675502.23123.4.camel@neuling.org \
--to=mikey@neuling.org \
--cc=anton@samba.org \
--cc=jack@codezen.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=michael@ozlabs.au.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.