From: lorenzo.pieralisi@arm.com (Lorenzo Pieralisi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] drivers: psci: make PSCI 1.0 functions initialization version dependent
Date: Fri, 23 Oct 2015 17:00:54 +0100 [thread overview]
Message-ID: <20151023160054.GA13029@red-moon> (raw)
In-Reply-To: <562A4B23.6020702@arm.com>
On Fri, Oct 23, 2015 at 03:58:43PM +0100, Sudeep Holla wrote:
[...]
> >@@ -347,9 +347,10 @@ static int __init psci_probe(void)
> >
> > psci_init_migrate();
> >
> >- psci_init_cpu_suspend();
> >-
> >- psci_init_system_suspend();
> >+ if (PSCI_VERSION_MAJOR(ver) >= 1) {
>
> Alternatively we can just add this check in psci_features function and
> return PSCI_RET_NOT_SUPPORTED if PSCI_VERSION_MAJOR(ver) < 1. New
> callers of psci_features are also protected and need not add checks
> at call sites. Thoughts ?
The resulting behaviour given the current code would be equivalent,
but I think you have a point, we can always refactor this code later
as a clean-up, I just prevented calling initialization functions
that have 0 chances to succeed on pre 1.0 firmware anyway (but do have
have a chance to fail as the breakage showed).
Thanks,
Lorenzo
next prev parent reply other threads:[~2015-10-23 16:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-23 14:46 [PATCH] drivers: psci: make PSCI 1.0 functions initialization version dependent Lorenzo Pieralisi
2015-10-23 14:58 ` Sudeep Holla
2015-10-23 16:00 ` Lorenzo Pieralisi [this message]
2015-10-23 15:21 ` Kevin Hilman
2015-10-23 16:02 ` Lorenzo Pieralisi
2015-10-23 19:09 ` Kevin Hilman
2015-10-23 16:59 ` Olof Johansson
2015-10-26 10:02 ` Lorenzo Pieralisi
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=20151023160054.GA13029@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).