linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: lorenzo.pieralisi@arm.com (Lorenzo Pieralisi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 4/5] drivers: firmware: psci: add extended stateid power_state support
Date: Fri, 23 Oct 2015 11:44:58 +0100	[thread overview]
Message-ID: <20151023104457.GA9309@red-moon> (raw)
In-Reply-To: <3982126.UybqODJKJo@wuerfel>

On Fri, Oct 23, 2015 at 12:23:53PM +0200, Arnd Bergmann wrote:
> On Thursday 22 October 2015 15:07:06 Kevin Hilman wrote:
> > On Wed, Jul 8, 2015 at 10:16 AM, Lorenzo Pieralisi
> > <lorenzo.pieralisi@arm.com> wrote:
> > > PSCI v1.0 augmented the power_state parameter format specification
> > > (extended stateid) and introduced a way to probe it through the
> > > PSCI_FEATURES interface.
> > >
> > > This patch implements code that detects the power_state format at
> > > run-time through the PSCI_FEATURES interface, so that the power_state
> > > argument can be properly detected and validated in the kernel according
> > > to the information provided through firmware.
> > >
> > > Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> > > Cc: Mark Rutland <mark.rutland@arm.com>
> > 
> > kernelci.org started finding a new boot failures in the arm-soc tree
> > on arm64 qemu[1] and it was bisected down to this patch, which is in
> > arm-soc in the form of commit a5c00bb28da0 (drivers: firmware: psci:
> > add extended stateid power_state support)
> > 
> > The patch doesn't revert cleanly, so I didn't dig much further, but
> > this suggests that some more testing on qemu is needed (or does qemu
> > need to be upgraded?)
> > 
> > Kevin
> > 
> > [1] http://kernelci.org/boot/all/job/arm-soc/kernel/v4.3-rc5-557-g159ca7e43189/
> > 
> 
> Could it be that qemu claims to support psci-1.0 but is actually not
> compatible?

Yes, the problem is, PSCI functions that are not implemented must return
NOT_SUPPORTED according to the SMC calling convention and the PSCI
spec. The KVM implementation was not compliant and we patched the
kernel already:

commit e2d997366dc5b ("ARM: kvm: psci: fix handling of unimplemented
functions")

So the KVM PSCI implementation is fine now.

Problem with Qemu emulation is that it does not emulate the PSCI 1.0
specs correctly (it does not even consider PSCI 1.0 functions proper PSCI
calls), I tested it and I think we should update Qemu as we
did with KVM kernel code instead of working around it by dodging the
problem in the PSCI implementation by adding code that checks the
PSCI version before issuing the PSCI calls through the respective
conduit.

Thoughts appreciated.

Thanks,
Lorenzo

  reply	other threads:[~2015-10-23 10:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-08 17:16 [PATCH v2 0/5] drivers: firmware: psci: add basic v1.0 support Lorenzo Pieralisi
2015-07-08 17:16 ` [PATCH v2 1/5] drivers: firmware: psci: add INVALID_ADDRESS return value Lorenzo Pieralisi
2015-07-08 17:16 ` [PATCH v2 2/5] drivers: firmware: psci: move power_state handling to generic code Lorenzo Pieralisi
2015-07-09 13:39   ` Catalin Marinas
2015-07-08 17:16 ` [PATCH v2 3/5] drivers: firmware: psci: add PSCI_FEATURES call Lorenzo Pieralisi
2015-07-08 17:16 ` [PATCH v2 4/5] drivers: firmware: psci: add extended stateid power_state support Lorenzo Pieralisi
2015-10-22 22:07   ` Kevin Hilman
2015-10-23 10:23     ` Arnd Bergmann
2015-10-23 10:44       ` Lorenzo Pieralisi [this message]
2015-10-23 10:55         ` Arnd Bergmann
2015-10-23 11:36           ` Lorenzo Pieralisi
2015-10-23 15:10             ` Kevin Hilman
2015-10-26 10:05               ` Lorenzo Pieralisi
2015-07-08 17:16 ` [PATCH v2 5/5] drivers: firmware: psci: add PSCI v1.0 DT bindings Lorenzo Pieralisi
2015-10-05 11:48   ` Andre Przywara
2015-10-05 12:06     ` Mark Rutland
2015-10-05 12:11     ` Lorenzo Pieralisi
2015-09-14 13:35 ` [PATCH v2 0/5] drivers: firmware: psci: add basic v1.0 support Lorenzo Pieralisi
2015-09-15  3:23   ` Jisheng Zhang

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=20151023104457.GA9309@red-moon \
    --to=lorenzo.pieralisi@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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).