From: Paul Mackerras <paulus@ozlabs.org>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Denis Kirjanov <kda@linux-powerpc.org>,
linuxppc-dev@ozlabs.org, benh@kernel.crashing.org
Subject: Re: [PATCH] kvm: powerpc: book3s: Disable preemption while accessing paca xics_phys filed
Date: Wed, 29 Mar 2017 20:37:47 +1100 [thread overview]
Message-ID: <20170329093747.GC13844@fergus.ozlabs.ibm.com> (raw)
In-Reply-To: <87a884evrc.fsf@concordia.ellerman.id.au>
On Wed, Mar 29, 2017 at 12:07:03PM +1100, Michael Ellerman wrote:
> Denis Kirjanov <kda@linux-powerpc.org> writes:
>
[...]
> > @@ -3930,7 +3934,11 @@ static int kvmppc_book3s_init_hv(void)
> > * indirectly, via OPAL.
> > */
> > #ifdef CONFIG_SMP
> > - if (!get_paca()->kvm_hstate.xics_phys) {
> > + preempt_disable();
> > + xics_phys = get_paca()->kvm_hstate.xics_phys;
> > + preempt_enable();
> > +
> > + if (!xics_phys) {
> > struct device_node *np;
>
> Can you tell me what actual problem (other than the warning) this is
> fixing?
If paca->kvm_hstate.xics_phys is non-zero on one cpu, it will be
non-zero on them all. Therefore this is not fixing any actual
problem, just the warning.
By the way, the #ifdefs are ugly, and could be removed. (Yes I know
it was me that put the first #ifdef in that function.)
Paul.
next prev parent reply other threads:[~2017-03-29 9:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-27 8:26 [PATCH] kvm: powerpc: book3s: Disable preemption while accessing paca xics_phys filed Denis Kirjanov
2017-03-29 1:07 ` Michael Ellerman
2017-03-29 8:54 ` Denis Kirjanov
2017-03-29 9:37 ` Paul Mackerras [this message]
2017-03-29 9:45 ` Denis Kirjanov
2017-03-29 10:46 ` Michael Ellerman
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=20170329093747.GC13844@fergus.ozlabs.ibm.com \
--to=paulus@ozlabs.org \
--cc=benh@kernel.crashing.org \
--cc=kda@linux-powerpc.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mpe@ellerman.id.au \
/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;
as well as URLs for NNTP newsgroup(s).