[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150305181904.GE4932@quad.lixom.net>
Date: Thu, 5 Mar 2015 10:19:04 -0800
From: Olof Johansson <olof@...om.net>
To: Hanjun Guo <hanjun.guo@...aro.org>
Cc: Catalin Marinas <catalin.marinas@....com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Will Deacon <will.deacon@....com>,
Grant Likely <grant.likely@...aro.org>,
Lorenzo Pieralisi <Lorenzo.Pieralisi@....com>,
Arnd Bergmann <arnd@...db.de>,
Mark Rutland <mark.rutland@....com>,
Graeme Gregory <graeme.gregory@...aro.org>,
Sudeep Holla <Sudeep.Holla@....com>,
Jon Masters <jcm@...hat.com>,
Marc Zyngier <marc.zyngier@....com>,
Mark Brown <broonie@...nel.org>,
Robert Richter <rric@...nel.org>,
Timur Tabi <timur@...eaurora.org>,
Ashwin Chaugule <ashwinc@...eaurora.org>,
suravee.suthikulpanit@....com, linux-acpi@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linaro-acpi@...ts.linaro.org,
Tomasz Nowicki <tomasz.nowicki@...aro.org>
Subject: Re: [PATCH v9 11/21] ARM64 / ACPI: Get PSCI flags in FADT for PSCI
init
Hi,
On Wed, Feb 25, 2015 at 04:39:51PM +0800, Hanjun Guo wrote:
> From: Graeme Gregory <graeme.gregory@...aro.org>
>
> There are two flags: PSCI_COMPLIANT and PSCI_USE_HVC. When set,
> the former signals to the OS that the firmware is PSCI compliant.
> The latter selects the appropriate conduit for PSCI calls by
> toggling between Hypervisor Calls (HVC) and Secure Monitor Calls
> (SMC).
>
> FADT table contains such information in ACPI 5.1, FADT table was
> parsed in ACPI table init and copy to struct acpi_gbl_FADT, so
> use the flags in struct acpi_gbl_FADT for PSCI init.
>
> Since ACPI 5.1 doesn't support self defined PSCI function IDs,
> which means that only PSCI 0.2+ is supported in ACPI.
>
> CC: Lorenzo Pieralisi <lorenzo.pieralisi@....com>
> CC: Catalin Marinas <catalin.marinas@....com>
> CC: Will Deacon <will.deacon@....com>
> Tested-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@....com>
> Tested-by: Yijing Wang <wangyijing@...wei.com>
> Tested-by: Mark Langsdorf <mlangsdo@...hat.com>
> Tested-by: Jon Masters <jcm@...hat.com>
> Tested-by: Timur Tabi <timur@...eaurora.org>
> Tested-by: Robert Richter <rrichter@...ium.com>
> Acked-by: Robert Richter <rrichter@...ium.com>
> Signed-off-by: Graeme Gregory <graeme.gregory@...aro.org>
> Signed-off-by: Tomasz Nowicki <tomasz.nowicki@...aro.org>
> Signed-off-by: Hanjun Guo <hanjun.guo@...aro.org>
Acked-by: Olof Johansson <olof@...om.net>
However, a comment on the color of the bike shed below. I'm fine with this
being addressed with an incremental patch instead of respun:
> diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
> index e8c7000..97fa7f3 100644
> --- a/arch/arm64/kernel/setup.c
> +++ b/arch/arm64/kernel/setup.c
> @@ -390,10 +390,12 @@ void __init setup_arch(char **cmdline_p)
>
> early_ioremap_reset();
>
> - if (acpi_disabled)
> + if (acpi_disabled) {
> unflatten_device_tree();
> -
> - psci_init();
> + psci_dt_init();
> + } else {
> + psci_acpi_init();
> + }
I would prefer having a common psci_init() in psci.c, which in turn calls
either the dt or the acpi version, and after that calls the set_functions
if the init function passed -- it'll keep more code common as new versions
of PSCI is added.
It also keeps setup_arch() somewhat cleaner, and avoids bubbling up the
dt-vs-acpi differences to the top level.
-Olof
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists