From: will.deacon@arm.com (Will Deacon)
To: linus-amlogic@lists.infradead.org
Subject: [PATCH 1/2] arm: kernel: Add SMC structure parameter
Date: Tue, 6 Dec 2016 11:55:08 +0000 [thread overview]
Message-ID: <20161206115507.GD2498@arm.com> (raw)
In-Reply-To: <1480405463-23165-2-git-send-email-andy.gross@linaro.org>
Hi Andy,
On Tue, Nov 29, 2016 at 01:44:22AM -0600, Andy Gross wrote:
> This patch adds a quirk parameter to the arm_smccc_smc call. The quirk
> structure allows for specialized SMC operations due to SoC specific
> requirements.
>
> This patch also fixes up all the current users of the arm_smccc_smc API.
>
> This patch and partial implementation was suggested by Will Deacon.
>
> Signed-off-by: Andy Gross <andy.gross@linaro.org>
> ---
> arch/arm/kernel/smccc-call.S | 3 ++-
> arch/arm/mach-artpec/board-artpec6.c | 2 +-
> arch/arm64/kernel/asm-offsets.c | 7 +++++--
> arch/arm64/kernel/smccc-call.S | 3 ++-
> drivers/clk/rockchip/clk-ddr.c | 6 +++---
> drivers/devfreq/rk3399_dmc.c | 6 +++---
> drivers/firmware/meson/meson_sm.c | 2 +-
> drivers/firmware/psci.c | 2 +-
> drivers/firmware/qcom_scm-64.c | 4 ++--
> drivers/gpu/drm/mediatek/mtk_hdmi.c | 2 +-
> include/linux/arm-smccc.h | 18 ++++++++++++++++--
> 11 files changed, 37 insertions(+), 18 deletions(-)
Thanks for respinning this; I'd forgotten about it!
> diff --git a/arch/arm/kernel/smccc-call.S b/arch/arm/kernel/smccc-call.S
> index 37669e7..e77950a 100644
> --- a/arch/arm/kernel/smccc-call.S
> +++ b/arch/arm/kernel/smccc-call.S
> @@ -47,7 +47,8 @@ UNWIND( .fnend)
> /*
> * void smccc_smc(unsigned long a0, unsigned long a1, unsigned long a2,
> * unsigned long a3, unsigned long a4, unsigned long a5,
> - * unsigned long a6, unsigned long a7, struct arm_smccc_res *res)
> + * unsigned long a6, unsigned long a7, struct arm_smccc_res *res,
> + * struct arm_smccc_quirk *quirk)
I'd not thought of doing it like this -- I envisaged embedding the quirk
structure into arm_smccc_res, but this works too. I wonder if we could avoid
having to pass NULL everywhere if we renamed arm_smccc_{hvc.smc} and added
a default wrapper around them?
For example, rename arm_smccc_smc to __arm_smccc_smc, add a macro called
arm_smccc_smc that passes a NULL argument for the quirk, then finally add
a macro arm_smccc_smc_quirk that takes the additional parameter?
Will
WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>
To: Andy Gross <andy.gross-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: jesper.nilsson-VrBV9hrLPhE@public.gmane.org,
lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org,
heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org,
matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
Srinivas Kandagatla
<srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
lars.persson-VrBV9hrLPhE@public.gmane.org,
p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
niklas.cassel-VrBV9hrLPhE@public.gmane.org,
ck.hu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org,
linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
Bjorn Andersson
<bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Kevin Hilman <khilman-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH 1/2] arm: kernel: Add SMC structure parameter
Date: Tue, 6 Dec 2016 11:55:08 +0000 [thread overview]
Message-ID: <20161206115507.GD2498@arm.com> (raw)
In-Reply-To: <1480405463-23165-2-git-send-email-andy.gross-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Hi Andy,
On Tue, Nov 29, 2016 at 01:44:22AM -0600, Andy Gross wrote:
> This patch adds a quirk parameter to the arm_smccc_smc call. The quirk
> structure allows for specialized SMC operations due to SoC specific
> requirements.
>
> This patch also fixes up all the current users of the arm_smccc_smc API.
>
> This patch and partial implementation was suggested by Will Deacon.
>
> Signed-off-by: Andy Gross <andy.gross-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> ---
> arch/arm/kernel/smccc-call.S | 3 ++-
> arch/arm/mach-artpec/board-artpec6.c | 2 +-
> arch/arm64/kernel/asm-offsets.c | 7 +++++--
> arch/arm64/kernel/smccc-call.S | 3 ++-
> drivers/clk/rockchip/clk-ddr.c | 6 +++---
> drivers/devfreq/rk3399_dmc.c | 6 +++---
> drivers/firmware/meson/meson_sm.c | 2 +-
> drivers/firmware/psci.c | 2 +-
> drivers/firmware/qcom_scm-64.c | 4 ++--
> drivers/gpu/drm/mediatek/mtk_hdmi.c | 2 +-
> include/linux/arm-smccc.h | 18 ++++++++++++++++--
> 11 files changed, 37 insertions(+), 18 deletions(-)
Thanks for respinning this; I'd forgotten about it!
> diff --git a/arch/arm/kernel/smccc-call.S b/arch/arm/kernel/smccc-call.S
> index 37669e7..e77950a 100644
> --- a/arch/arm/kernel/smccc-call.S
> +++ b/arch/arm/kernel/smccc-call.S
> @@ -47,7 +47,8 @@ UNWIND( .fnend)
> /*
> * void smccc_smc(unsigned long a0, unsigned long a1, unsigned long a2,
> * unsigned long a3, unsigned long a4, unsigned long a5,
> - * unsigned long a6, unsigned long a7, struct arm_smccc_res *res)
> + * unsigned long a6, unsigned long a7, struct arm_smccc_res *res,
> + * struct arm_smccc_quirk *quirk)
I'd not thought of doing it like this -- I envisaged embedding the quirk
structure into arm_smccc_res, but this works too. I wonder if we could avoid
having to pass NULL everywhere if we renamed arm_smccc_{hvc.smc} and added
a default wrapper around them?
For example, rename arm_smccc_smc to __arm_smccc_smc, add a macro called
arm_smccc_smc that passes a NULL argument for the quirk, then finally add
a macro arm_smccc_smc_quirk that takes the additional parameter?
Will
WARNING: multiple messages have this Message-ID (diff)
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] arm: kernel: Add SMC structure parameter
Date: Tue, 6 Dec 2016 11:55:08 +0000 [thread overview]
Message-ID: <20161206115507.GD2498@arm.com> (raw)
In-Reply-To: <1480405463-23165-2-git-send-email-andy.gross@linaro.org>
Hi Andy,
On Tue, Nov 29, 2016 at 01:44:22AM -0600, Andy Gross wrote:
> This patch adds a quirk parameter to the arm_smccc_smc call. The quirk
> structure allows for specialized SMC operations due to SoC specific
> requirements.
>
> This patch also fixes up all the current users of the arm_smccc_smc API.
>
> This patch and partial implementation was suggested by Will Deacon.
>
> Signed-off-by: Andy Gross <andy.gross@linaro.org>
> ---
> arch/arm/kernel/smccc-call.S | 3 ++-
> arch/arm/mach-artpec/board-artpec6.c | 2 +-
> arch/arm64/kernel/asm-offsets.c | 7 +++++--
> arch/arm64/kernel/smccc-call.S | 3 ++-
> drivers/clk/rockchip/clk-ddr.c | 6 +++---
> drivers/devfreq/rk3399_dmc.c | 6 +++---
> drivers/firmware/meson/meson_sm.c | 2 +-
> drivers/firmware/psci.c | 2 +-
> drivers/firmware/qcom_scm-64.c | 4 ++--
> drivers/gpu/drm/mediatek/mtk_hdmi.c | 2 +-
> include/linux/arm-smccc.h | 18 ++++++++++++++++--
> 11 files changed, 37 insertions(+), 18 deletions(-)
Thanks for respinning this; I'd forgotten about it!
> diff --git a/arch/arm/kernel/smccc-call.S b/arch/arm/kernel/smccc-call.S
> index 37669e7..e77950a 100644
> --- a/arch/arm/kernel/smccc-call.S
> +++ b/arch/arm/kernel/smccc-call.S
> @@ -47,7 +47,8 @@ UNWIND( .fnend)
> /*
> * void smccc_smc(unsigned long a0, unsigned long a1, unsigned long a2,
> * unsigned long a3, unsigned long a4, unsigned long a5,
> - * unsigned long a6, unsigned long a7, struct arm_smccc_res *res)
> + * unsigned long a6, unsigned long a7, struct arm_smccc_res *res,
> + * struct arm_smccc_quirk *quirk)
I'd not thought of doing it like this -- I envisaged embedding the quirk
structure into arm_smccc_res, but this works too. I wonder if we could avoid
having to pass NULL everywhere if we renamed arm_smccc_{hvc.smc} and added
a default wrapper around them?
For example, rename arm_smccc_smc to __arm_smccc_smc, add a macro called
arm_smccc_smc that passes a NULL argument for the quirk, then finally add
a macro arm_smccc_smc_quirk that takes the additional parameter?
Will
WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will.deacon@arm.com>
To: Andy Gross <andy.gross@linaro.org>
Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux@armlinux.org.uk,
jesper.nilsson@axis.com, lars.persson@axis.com,
niklas.cassel@axis.com, heiko@sntech.de,
Kevin Hilman <khilman@baylibre.com>,
lorenzo.pieralisi@arm.com, ck.hu@mediatek.com,
p.zabel@pengutronix.de, matthias.bgg@gmail.com,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
linux-mediatek@lists.infradead.org,
linux-rockchip@lists.infradead.org,
linux-amlogic@lists.infradead.org
Subject: Re: [PATCH 1/2] arm: kernel: Add SMC structure parameter
Date: Tue, 6 Dec 2016 11:55:08 +0000 [thread overview]
Message-ID: <20161206115507.GD2498@arm.com> (raw)
In-Reply-To: <1480405463-23165-2-git-send-email-andy.gross@linaro.org>
Hi Andy,
On Tue, Nov 29, 2016 at 01:44:22AM -0600, Andy Gross wrote:
> This patch adds a quirk parameter to the arm_smccc_smc call. The quirk
> structure allows for specialized SMC operations due to SoC specific
> requirements.
>
> This patch also fixes up all the current users of the arm_smccc_smc API.
>
> This patch and partial implementation was suggested by Will Deacon.
>
> Signed-off-by: Andy Gross <andy.gross@linaro.org>
> ---
> arch/arm/kernel/smccc-call.S | 3 ++-
> arch/arm/mach-artpec/board-artpec6.c | 2 +-
> arch/arm64/kernel/asm-offsets.c | 7 +++++--
> arch/arm64/kernel/smccc-call.S | 3 ++-
> drivers/clk/rockchip/clk-ddr.c | 6 +++---
> drivers/devfreq/rk3399_dmc.c | 6 +++---
> drivers/firmware/meson/meson_sm.c | 2 +-
> drivers/firmware/psci.c | 2 +-
> drivers/firmware/qcom_scm-64.c | 4 ++--
> drivers/gpu/drm/mediatek/mtk_hdmi.c | 2 +-
> include/linux/arm-smccc.h | 18 ++++++++++++++++--
> 11 files changed, 37 insertions(+), 18 deletions(-)
Thanks for respinning this; I'd forgotten about it!
> diff --git a/arch/arm/kernel/smccc-call.S b/arch/arm/kernel/smccc-call.S
> index 37669e7..e77950a 100644
> --- a/arch/arm/kernel/smccc-call.S
> +++ b/arch/arm/kernel/smccc-call.S
> @@ -47,7 +47,8 @@ UNWIND( .fnend)
> /*
> * void smccc_smc(unsigned long a0, unsigned long a1, unsigned long a2,
> * unsigned long a3, unsigned long a4, unsigned long a5,
> - * unsigned long a6, unsigned long a7, struct arm_smccc_res *res)
> + * unsigned long a6, unsigned long a7, struct arm_smccc_res *res,
> + * struct arm_smccc_quirk *quirk)
I'd not thought of doing it like this -- I envisaged embedding the quirk
structure into arm_smccc_res, but this works too. I wonder if we could avoid
having to pass NULL everywhere if we renamed arm_smccc_{hvc.smc} and added
a default wrapper around them?
For example, rename arm_smccc_smc to __arm_smccc_smc, add a macro called
arm_smccc_smc that passes a NULL argument for the quirk, then finally add
a macro arm_smccc_smc_quirk that takes the additional parameter?
Will
next prev parent reply other threads:[~2016-12-06 11:55 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-29 7:44 [PATCH 0/2] Support ARM SMCC SoC vendor quirks Andy Gross
2016-11-29 7:44 ` Andy Gross
2016-11-29 7:44 ` Andy Gross
2016-11-29 7:44 ` [PATCH 1/2] arm: kernel: Add SMC structure parameter Andy Gross
2016-11-29 7:44 ` Andy Gross
2016-11-29 7:44 ` Andy Gross
2016-12-06 11:55 ` Will Deacon [this message]
2016-12-06 11:55 ` Will Deacon
2016-12-06 11:55 ` Will Deacon
2016-12-06 11:55 ` Will Deacon
2016-12-06 18:01 ` Andy Gross
2016-12-06 18:01 ` Andy Gross
2016-12-06 18:01 ` Andy Gross
2016-11-29 7:44 ` [PATCH 2/2] firmware: qcom: scm: Fix interrupted SCM calls Andy Gross
2016-11-29 7:44 ` Andy Gross
2016-11-29 7:44 ` Andy Gross
2016-12-06 11:54 ` Will Deacon
2016-12-06 11:54 ` Will Deacon
2016-12-06 11:54 ` Will Deacon
2016-12-06 11:54 ` Will Deacon
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=20161206115507.GD2498@arm.com \
--to=will.deacon@arm.com \
--cc=linus-amlogic@lists.infradead.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.