mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	kvmarm <kvmarm@lists.cs.columbia.edu>,
	Mark Rutland <mark.rutland@arm.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>, Jon Masters <jcm@redhat.com>,
	Christoffer Dall <christoffer.dall@linaro.org>
Subject: Re: [PATCH 12/14] firmware/psci: Expose PSCI conduit
Date: Mon, 29 Jan 2018 10:08:30 +0000	[thread overview]
Message-ID: <26bcd8c6-c834-3d3a-426a-98fca3dfbbbf@arm.com> (raw)
In-Reply-To: <CAKv+Gu8RAzwpcGqrSxsegYnVgfFQCkYp+sgaPzm8906A4QMLCw@mail.gmail.com>

On 29/01/18 10:04, Ard Biesheuvel wrote:
> On 26 January 2018 at 14:28, Marc Zyngier <marc.zyngier@arm.com> wrote:
>> In order to call into the firmware to apply workarounds, it is
>> useful to find out whether we're using HVC or SMC. Let's expose
>> this through the psci_ops.
>>
>> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
>> ---
>>  drivers/firmware/psci.c | 26 +++++++++++++++++++++-----
>>  include/linux/psci.h    |  7 +++++++
>>  2 files changed, 28 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
>> index 8b25d31e8401..570187e5d084 100644
>> --- a/drivers/firmware/psci.c
>> +++ b/drivers/firmware/psci.c
>> @@ -59,7 +59,9 @@ bool psci_tos_resident_on(int cpu)
>>         return cpu == resident_cpu;
>>  }
>>
>> -struct psci_operations psci_ops;
>> +struct psci_operations psci_ops = {
>> +       .conduit = PSCI_CONDUIT_NONE,
>> +};
>>
>>  typedef unsigned long (psci_fn)(unsigned long, unsigned long,
>>                                 unsigned long, unsigned long);
>> @@ -210,6 +212,20 @@ static unsigned long psci_migrate_info_up_cpu(void)
>>                               0, 0, 0);
>>  }
>>
>> +static void set_conduit(enum psci_conduit conduit)
>> +{
>> +       switch (conduit) {
>> +       case PSCI_CONDUIT_HVC:
>> +               invoke_psci_fn = __invoke_psci_fn_hvc;
>> +               break;
>> +       case PSCI_CONDUIT_SMC:
>> +               invoke_psci_fn = __invoke_psci_fn_smc;
>> +               break;
> 
> I get a GCC warning here about PSCI_CONDUIT_NONE not being handled.


Yup, I fixed it already.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

  reply	other threads:[~2018-01-29 10:08 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-26 14:28 [PATCH 00/14] arm64: Add SMCCC v1.1 support and CVE-2017-5715 Marc Zyngier
2018-01-26 14:28 ` [PATCH 01/14] arm64: KVM: Fix SMCCC handling of unimplemented SMC/HVC calls Marc Zyngier
2018-01-26 14:28 ` [PATCH 02/14] arm: " Marc Zyngier
2018-01-26 14:28 ` [PATCH 03/14] arm/arm64: KVM: Consolidate the PSCI include files Marc Zyngier
2018-01-26 18:10   ` Marc Zyngier
2018-01-26 14:28 ` [PATCH 04/14] arm/arm64: KVM: Add PSCI_VERSION helper Marc Zyngier
2018-01-26 14:28 ` [PATCH 05/14] arm/arm64: KVM: Add smccc accessors to PSCI code Marc Zyngier
2018-01-26 14:28 ` [PATCH 06/14] arm/arm64: KVM: Implement PSCI 1.0 support Marc Zyngier
2018-01-26 14:28 ` [PATCH 07/14] arm/arm64: KVM: Add PSCI version selection API Marc Zyngier
2018-01-26 14:28 ` [PATCH 08/14] arm/arm64: KVM: Advertise SMCCC v1.1 Marc Zyngier
2018-01-26 14:28 ` [PATCH 09/14] arm/arm64: KVM: Turn kvm_psci_version into a static inline Marc Zyngier
2018-01-26 14:28 ` [PATCH 10/14] arm64: KVM: Report SMCCC_ARCH_WORKAROUND_1 BP hardening support Marc Zyngier
2018-01-26 14:28 ` [PATCH 11/14] arm64: KVM: Add SMCCC_ARCH_WORKAROUND_1 fast handling Marc Zyngier
2018-01-26 14:28 ` [PATCH 12/14] firmware/psci: Expose PSCI conduit Marc Zyngier
2018-01-29 10:04   ` Ard Biesheuvel
2018-01-29 10:08     ` Marc Zyngier [this message]
2018-01-26 14:28 ` [PATCH 13/14] firmware/psci: Expose SMCCC version through psci_ops Marc Zyngier
2018-01-29 10:03   ` Ard Biesheuvel
2018-01-26 14:28 ` [PATCH 14/14] arm64: Add ARM_SMCCC_ARCH_WORKAROUND_1 BP hardening support Marc Zyngier
2018-01-26 15:50   ` Robin Murphy
2018-01-26 16:07     ` Marc Zyngier
2018-01-28 23:08   ` Ard Biesheuvel
2018-01-29  9:36     ` Marc Zyngier
2018-01-29  9:42       ` Ard Biesheuvel
2018-01-29 10:07         ` Marc Zyngier
2018-01-29 10:17           ` Ard Biesheuvel

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=26bcd8c6-c834-3d3a-426a-98fca3dfbbbf@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=christoffer.dall@linaro.org \
    --cc=jcm@redhat.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=peter.maydell@linaro.org \
    --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

all inboxes | Powered by JetHome®