All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Mark Rutland <mark.rutland@arm.com>
Cc: linux-arm-kernel@lists.infradead.org,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Steven Price <steven.price@arm.com>,
	linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	harb@amperecomputing.com
Subject: Re: [PATCH v3 6/7] firmware: smccc: Add function to fetch SMCCC version
Date: Fri, 15 May 2020 13:57:58 +0100	[thread overview]
Message-ID: <20200515125758.GC1591@bogus> (raw)
In-Reply-To: <20200515120811.GF67718@C02TD0UTHF1T.local>

On Fri, May 15, 2020 at 01:08:11PM +0100, Mark Rutland wrote:
> On Wed, May 06, 2020 at 05:44:10PM +0100, Sudeep Holla wrote:
> > For backward compatibility reasons, PSCI maintains SMCCC version as
> > SMCCC didn't provide ARM_SMCCC_VERSION_FUNC_ID until v1.1
> > 
> > Let us provide accessors to fetch the SMCCC version in PSCI so that
> > other SMCCC v1.1+ features can use it.
> 
> Stale commit message? This was factored out of PSCI in the prior commit.
>

Duh ! Will drop that.

> > Reviewed-by: Steven Price <steven.price@arm.com>
> > Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> > ---
> >  drivers/firmware/smccc/smccc.c | 4 ++++
> >  include/linux/arm-smccc.h      | 9 +++++++++
> >  2 files changed, 13 insertions(+)
> > 
> > diff --git a/drivers/firmware/smccc/smccc.c b/drivers/firmware/smccc/smccc.c
> > index 488699aae24f..672974df0dfe 100644
> > --- a/drivers/firmware/smccc/smccc.c
> > +++ b/drivers/firmware/smccc/smccc.c
> > @@ -24,3 +24,7 @@ enum arm_smccc_conduit arm_smccc_1_1_get_conduit(void)
> >  	return smccc_conduit;
> >  }
> >  
> > +u32 arm_smccc_version_get(void)
> > +{
> > +	return smccc_version;
> > +}
> 
> Could we please call this arm_smccc_get_version(), to align with the
> existing arm_smccc_1_1_get_conduit()?
>

Right will fix that. (I may suddenly got into SCMI mode where Greg or
someone asked me change all the function names to have verb at the end 😁)

> > diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h
> > index 11fb20bfa8f7..8dd54dad1ec5 100644
> > --- a/include/linux/arm-smccc.h
> > +++ b/include/linux/arm-smccc.h
> > @@ -109,6 +109,15 @@ void __init arm_smccc_version_init(u32 version, enum arm_smccc_conduit conduit);
> >   */
> >  enum arm_smccc_conduit arm_smccc_1_1_get_conduit(void);
> >  
> > +/**
> > + * arm_smccc_version_get()
> > + *
> > + * Returns the version to be used for SMCCCv1.1 or later.
> > + *
> > + * When SMCCCv1.1 or above is not present, assumes and returns SMCCCv1.0.
> > + */
> > +u32 arm_smccc_version_get(void);
> 
> Can we please reword the last line to something like:
>
> | When SMCCCv1.1 or above is not present, returns SMCCCv1.0, but this
> | does not imply the presence of firmware or a valid conduit. Callers
> | handling SMCCCv1.0 must determine the conduit by other means.
>

Sure

> With all that:
> 
> Acked-by: Mark Rutland <mark.rutland@arm.com>
> 

Thanks,

-- 
Regards,
Sudeep

WARNING: multiple messages have this Message-ID (diff)
From: Sudeep Holla <sudeep.holla@arm.com>
To: Mark Rutland <mark.rutland@arm.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Catalin Marinas <catalin.marinas@arm.com>,
	linux-kernel@vger.kernel.org, Steven Price <steven.price@arm.com>,
	harb@amperecomputing.com, Sudeep Holla <sudeep.holla@arm.com>,
	Will Deacon <will@kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 6/7] firmware: smccc: Add function to fetch SMCCC version
Date: Fri, 15 May 2020 13:57:58 +0100	[thread overview]
Message-ID: <20200515125758.GC1591@bogus> (raw)
In-Reply-To: <20200515120811.GF67718@C02TD0UTHF1T.local>

On Fri, May 15, 2020 at 01:08:11PM +0100, Mark Rutland wrote:
> On Wed, May 06, 2020 at 05:44:10PM +0100, Sudeep Holla wrote:
> > For backward compatibility reasons, PSCI maintains SMCCC version as
> > SMCCC didn't provide ARM_SMCCC_VERSION_FUNC_ID until v1.1
> > 
> > Let us provide accessors to fetch the SMCCC version in PSCI so that
> > other SMCCC v1.1+ features can use it.
> 
> Stale commit message? This was factored out of PSCI in the prior commit.
>

Duh ! Will drop that.

> > Reviewed-by: Steven Price <steven.price@arm.com>
> > Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> > ---
> >  drivers/firmware/smccc/smccc.c | 4 ++++
> >  include/linux/arm-smccc.h      | 9 +++++++++
> >  2 files changed, 13 insertions(+)
> > 
> > diff --git a/drivers/firmware/smccc/smccc.c b/drivers/firmware/smccc/smccc.c
> > index 488699aae24f..672974df0dfe 100644
> > --- a/drivers/firmware/smccc/smccc.c
> > +++ b/drivers/firmware/smccc/smccc.c
> > @@ -24,3 +24,7 @@ enum arm_smccc_conduit arm_smccc_1_1_get_conduit(void)
> >  	return smccc_conduit;
> >  }
> >  
> > +u32 arm_smccc_version_get(void)
> > +{
> > +	return smccc_version;
> > +}
> 
> Could we please call this arm_smccc_get_version(), to align with the
> existing arm_smccc_1_1_get_conduit()?
>

Right will fix that. (I may suddenly got into SCMI mode where Greg or
someone asked me change all the function names to have verb at the end 😁)

> > diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h
> > index 11fb20bfa8f7..8dd54dad1ec5 100644
> > --- a/include/linux/arm-smccc.h
> > +++ b/include/linux/arm-smccc.h
> > @@ -109,6 +109,15 @@ void __init arm_smccc_version_init(u32 version, enum arm_smccc_conduit conduit);
> >   */
> >  enum arm_smccc_conduit arm_smccc_1_1_get_conduit(void);
> >  
> > +/**
> > + * arm_smccc_version_get()
> > + *
> > + * Returns the version to be used for SMCCCv1.1 or later.
> > + *
> > + * When SMCCCv1.1 or above is not present, assumes and returns SMCCCv1.0.
> > + */
> > +u32 arm_smccc_version_get(void);
> 
> Can we please reword the last line to something like:
>
> | When SMCCCv1.1 or above is not present, returns SMCCCv1.0, but this
> | does not imply the presence of firmware or a valid conduit. Callers
> | handling SMCCCv1.0 must determine the conduit by other means.
>

Sure

> With all that:
> 
> Acked-by: Mark Rutland <mark.rutland@arm.com>
> 

Thanks,

-- 
Regards,
Sudeep

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

  reply	other threads:[~2020-05-15 12:58 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-06 16:44 [PATCH v3 0/7] firmware: smccc: Add basic SMCCC v1.2 + ARCH_SOC_ID support Sudeep Holla
2020-05-06 16:44 ` Sudeep Holla
2020-05-06 16:44 ` [PATCH v3 1/7] firmware: smccc: Add HAVE_ARM_SMCCC_DISCOVERY to identify SMCCC v1.1 and above Sudeep Holla
2020-05-06 16:44   ` Sudeep Holla
2020-05-15 11:37   ` Mark Rutland
2020-05-15 11:37     ` Mark Rutland
2020-05-06 16:44 ` [PATCH v3 2/7] firmware: smccc: Update link to latest SMCCC specification Sudeep Holla
2020-05-06 16:44   ` Sudeep Holla
2020-05-15 11:37   ` Mark Rutland
2020-05-15 11:37     ` Mark Rutland
2020-05-15 12:46     ` Sudeep Holla
2020-05-15 12:46       ` Sudeep Holla
2020-05-06 16:44 ` [PATCH v3 3/7] firmware: smccc: Add the definition for SMCCCv1.2 version/error codes Sudeep Holla
2020-05-06 16:44   ` Sudeep Holla
2020-05-15 11:38   ` Mark Rutland
2020-05-15 11:38     ` Mark Rutland
2020-05-15 13:52     ` Sudeep Holla
2020-05-15 13:52       ` Sudeep Holla
2020-05-06 16:44 ` [PATCH v3 4/7] firmware: smccc: Drop smccc_version enum and use ARM_SMCCC_VERSION_1_x instead Sudeep Holla
2020-05-06 16:44   ` Sudeep Holla
2020-05-15 11:39   ` Mark Rutland
2020-05-15 11:39     ` Mark Rutland
2020-05-06 16:44 ` [PATCH v3 5/7] firmware: smccc: Refactor SMCCC specific bits into separate file Sudeep Holla
2020-05-06 16:44   ` Sudeep Holla
2020-05-15 11:49   ` Mark Rutland
2020-05-15 11:49     ` Mark Rutland
2020-05-15 12:53     ` Sudeep Holla
2020-05-15 12:53       ` Sudeep Holla
2020-05-06 16:44 ` [PATCH v3 6/7] firmware: smccc: Add function to fetch SMCCC version Sudeep Holla
2020-05-06 16:44   ` Sudeep Holla
2020-05-15 12:08   ` Mark Rutland
2020-05-15 12:08     ` Mark Rutland
2020-05-15 12:57     ` Sudeep Holla [this message]
2020-05-15 12:57       ` Sudeep Holla
2020-05-06 16:44 ` [PATCH v3 7/7] firmware: smccc: Add ARCH_SOC_ID support Sudeep Holla
2020-05-06 16:44   ` Sudeep Holla
2020-05-15 12:50   ` Mark Rutland
2020-05-15 12:50     ` Mark Rutland
2020-05-15 14:13     ` Sudeep Holla
2020-05-15 14:13       ` Sudeep Holla
2020-05-15  7:50 ` [PATCH v3 0/7] firmware: smccc: Add basic SMCCC v1.2 + " Etienne Carriere
2020-05-15  7:50   ` Etienne Carriere
2020-05-15  9:16   ` Sudeep Holla
2020-05-15  9:16     ` Sudeep Holla

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=20200515125758.GC1591@bogus \
    --to=sudeep.holla@arm.com \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=harb@amperecomputing.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=steven.price@arm.com \
    --cc=will@kernel.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 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.