All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Martin <Dave.Martin@arm.com>
To: Mark Rutland <mark.rutland@arm.com>
Cc: lorenzo.pieralisi@arm.com, suzuki.poulose@arm.com,
	marc.zyngier@arm.com, catalin.marinas@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 1/6] arm/arm64: smccc/psci: add arm_smccc_1_1_get_conduit()
Date: Tue, 13 Aug 2019 12:38:12 +0100	[thread overview]
Message-ID: <20190813113812.GW10425@arm.com> (raw)
In-Reply-To: <20190812152649.GC52896@lakrids.cambridge.arm.com>

On Mon, Aug 12, 2019 at 04:26:49PM +0100, Mark Rutland wrote:
> On Mon, Aug 12, 2019 at 04:10:43PM +0100, Dave Martin wrote:
> > On Mon, Aug 12, 2019 at 04:06:35PM +0100, Mark Rutland wrote:
> > > On Mon, Aug 12, 2019 at 04:03:29PM +0100, Dave Martin wrote:
> > > > On Fri, Aug 09, 2019 at 02:22:40PM +0100, Mark Rutland wrote:
> > > > > diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h
> > > > > index 080012a6f025..df01a8579034 100644
> > > > > --- a/include/linux/arm-smccc.h
> > > > > +++ b/include/linux/arm-smccc.h
> > > > > @@ -80,6 +80,22 @@
> > > > >  
> > > > >  #include <linux/linkage.h>
> > > > >  #include <linux/types.h>
> > > > > +
> > > > > +enum arm_smccc_conduit {
> > > > > +	SMCCC_CONDUIT_NONE,
> > > > 
> > > > If this is intended to have the value 0, is it worth making that
> > > > explicit?  I can never remember whether enums start at 1 or 0 by
> > > > default...
> > > 
> > > They start at 0. I intend that checks are done explicitly against an
> > > enum value, so I'm not sure that matters.
> > 
> > Not really.
> > 
> > It depends whether code like if (!arm_smccc_1_1_get_conduit()) { ... }
> > is considered sane or not.
> > 
> > If we don't think people should be doing this, omitting the explicit
> > value specifier seems fine.
> 
> My expectation was that they'd check explicitly against
> SMCCC_CONDUIT_NONE, since all of the existing callers care about the
> specific conduit for other reasons (e.g. patching).
> 
> I also expect to wrap this in a sbusequent patch that provides helpers:
> 
> * arm_smccc_1_1_available()
> * arm_smccc_1_1_call(...)
> 
> ... for the cases where we just want to make a call and don't care about
> the specific conduit.

Seems reasonable.

Cheers
---Dave

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-08-13 11:40 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 [this message]
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
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=20190813113812.GW10425@arm.com \
    --to=dave.martin@arm.com \
    --cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.