From: Paul Mackerras <paulus@ozlabs.org>
To: linuxppc-dev@ozlabs.org
Cc: "Gautham R. Shenoy" <ego@linux.vnet.ibm.com>
Subject: Possible bug in commit f3b3f28493d9
Date: Thu, 14 Sep 2017 14:57:07 +1000 [thread overview]
Message-ID: <20170914045707.GA25715@fergus.ozlabs.ibm.com> (raw)
Commit f3b3f28493d9 ("powerpc/powernv/idle: Don't override
default/deepest directly in kernel", 2017-03-22) made the following
change in pnv_cpu_offline() in arch/powerpc/platforms/powernv/idle.c:
- if (cpu_has_feature(CPU_FTR_ARCH_300)) {
+ if (cpu_has_feature(CPU_FTR_ARCH_300) && deepest_stop_found) {
srr1 = power9_idle_stop(pnv_deepest_stop_psscr_val,
pnv_deepest_stop_psscr_mask);
} else if (idle_states & OPAL_PM_WINKLE_ENABLED) {
srr1 = power7_winkle();
Which seems to be saying that previously, on POWER9 we would always
call power9_idle_stop(), but now we might possibly call
power7_idle_insn() to do a nap or sleep or rvwinkle instruction.
Is this really what was meant? Nap, sleep and rvwinkle are illegal
instructions on POWER9. It looks to me as if that statement needs to
be restructured to do what the commit description says, which is to
call power9_idle_stop if we have found a valid stop state, and
otherwise to poll.
At present we are relying on idle_states not not having any of the
nap/sleep/winkle bits set in it. Is that guaranteed on POWER9? If so
it is at least deserving of a comment.
Paul.
next reply other threads:[~2017-09-14 5:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-14 4:57 Paul Mackerras [this message]
2017-09-15 8:40 ` Possible bug in commit f3b3f28493d9 Gautham R Shenoy
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=20170914045707.GA25715@fergus.ozlabs.ibm.com \
--to=paulus@ozlabs.org \
--cc=ego@linux.vnet.ibm.com \
--cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).