From: Catalin Marinas <catalin.marinas@arm.com>
To: Russell King <linux@armlinux.org.uk>
Cc: Mark Rutland <mark.rutland@arm.com>,
lorenzo.pieralisi@arm.com, suzuki.poulose@arm.com,
marc.zyngier@arm.com, will.deacon@arm.com, linux@armlinux.org.uk,
james.morse@arm.com, robin.murphy@arm.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCHv3 3/6] arm: spectre-v2: use arm_smccc_1_1_get_conduit()
Date: Fri, 11 Oct 2019 15:02:58 +0100 [thread overview]
Message-ID: <20191011140258.GA3607@arrakis.emea.arm.com> (raw)
In-Reply-To: <20190809132245.43505-4-mark.rutland@arm.com>
Hi Russell,
Are you ok with the arm patch below to go in via the arm64 tree? I'd
like patches 1-5 from [1] to go into 5.5 but patches 4, 5 depend on
patch 3 also being queued.
If you'd rather merge it separately, I can provide a stable branch with
patch 1 so that you can merge it and apply patch 3 on top (or any other
option that works for you).
Thanks,
Catalin
[1] http://lkml.kernel.org/r/20190809132245.43505-1-mark.rutland@arm.com
On Fri, Aug 09, 2019 at 02:22:42PM +0100, Mark Rutland wrote:
> Now that we have arm_smccc_1_1_get_conduit(), we can hide the PSCI
> implementation details from the arm spectre-v2 code, so let's do so.
>
> As arm_smccc_1_1_get_conduit() implicitly checks that the SMCCC version
> is at least SMCCC_VERSION_1_1, we no longer need to check this
> explicitly where switch statements have a default case.
>
> There should be no functional change as a result of this patch.
>
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> Cc: Russell King <linux@armlinux.org.uk>
> ---
> arch/arm/mm/proc-v7-bugs.c | 10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/arch/arm/mm/proc-v7-bugs.c b/arch/arm/mm/proc-v7-bugs.c
> index 9a07916af8dd..54d87506d3b5 100644
> --- a/arch/arm/mm/proc-v7-bugs.c
> +++ b/arch/arm/mm/proc-v7-bugs.c
> @@ -1,7 +1,6 @@
> // SPDX-License-Identifier: GPL-2.0
> #include <linux/arm-smccc.h>
> #include <linux/kernel.h>
> -#include <linux/psci.h>
> #include <linux/smp.h>
>
> #include <asm/cp15.h>
> @@ -75,11 +74,8 @@ static void cpu_v7_spectre_init(void)
> case ARM_CPU_PART_CORTEX_A72: {
> struct arm_smccc_res res;
>
> - if (psci_ops.smccc_version == SMCCC_VERSION_1_0)
> - break;
> -
> - switch (psci_ops.conduit) {
> - case PSCI_CONDUIT_HVC:
> + switch (arm_smccc_1_1_get_conduit()) {
> + case SMCCC_CONDUIT_HVC:
> arm_smccc_1_1_hvc(ARM_SMCCC_ARCH_FEATURES_FUNC_ID,
> ARM_SMCCC_ARCH_WORKAROUND_1, &res);
> if ((int)res.a0 != 0)
> @@ -90,7 +86,7 @@ static void cpu_v7_spectre_init(void)
> spectre_v2_method = "hypervisor";
> break;
>
> - case PSCI_CONDUIT_SMC:
> + case SMCCC_CONDUIT_SMC:
> arm_smccc_1_1_smc(ARM_SMCCC_ARCH_FEATURES_FUNC_ID,
> ARM_SMCCC_ARCH_WORKAROUND_1, &res);
> if ((int)res.a0 != 0)
> --
> 2.11.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-10-11 14:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-09 13:22 [PATCHv3 0/6] arm/arm64: SMCCC conduit cleanup Mark Rutland
2019-08-09 13:22 ` [PATCHv3 1/6] arm/arm64: smccc/psci: add arm_smccc_1_1_get_conduit() Mark Rutland
2019-08-12 15:03 ` Dave Martin
2019-08-12 15:06 ` Mark Rutland
2019-08-12 15:10 ` Dave Martin
2019-08-12 15:26 ` Mark Rutland
2019-08-13 11:38 ` Dave Martin
2019-08-09 13:22 ` [PATCHv3 2/6] arm64: errata: use arm_smccc_1_1_get_conduit() Mark Rutland
2019-08-09 13:22 ` [PATCHv3 3/6] arm: spectre-v2: " Mark Rutland
2019-10-11 14:02 ` Catalin Marinas [this message]
2019-08-09 13:22 ` [PATCHv3 4/6] firmware/psci: use common SMCCC_CONDUIT_* Mark Rutland
2019-08-09 13:22 ` [PATCHv3 5/6] firmware: arm_sdei: " Mark Rutland
2019-08-09 13:22 ` [PATCHv3 6/6] smccc: make 1.1 macros value-returning Mark Rutland
2019-08-15 16:42 ` Will Deacon
2019-08-19 10:44 ` Mark Rutland
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=20191011140258.GA3607@arrakis.emea.arm.com \
--to=catalin.marinas@arm.com \
--cc=james.morse@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=lorenzo.pieralisi@arm.com \
--cc=marc.zyngier@arm.com \
--cc=mark.rutland@arm.com \
--cc=robin.murphy@arm.com \
--cc=suzuki.poulose@arm.com \
--cc=will.deacon@arm.com \
/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).