Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1260584 > unrolled thread
| Started by | Will Deacon <will.deacon@arm.com> |
|---|---|
| First post | 2015-11-02 13:00 +0100 |
| Last post | 2015-11-02 14:50 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v6 2/6] drivers: psci: replace psci firmware calls Will Deacon <will.deacon@arm.com> - 2015-11-02 13:00 +0100
Re: [PATCH v6 2/6] drivers: psci: replace psci firmware calls Jens Wiklander <jens.wiklander@linaro.org> - 2015-11-02 14:10 +0100
Re: [PATCH v6 2/6] drivers: psci: replace psci firmware calls Will Deacon <will.deacon@arm.com> - 2015-11-02 14:50 +0100
| From | Will Deacon <will.deacon@arm.com> |
|---|---|
| Date | 2015-11-02 13:00 +0100 |
| Subject | Re: [PATCH v6 2/6] drivers: psci: replace psci firmware calls |
| Message-ID | <qqlWi-4QZ-41@gated-at.bofh.it> |
On Thu, Oct 29, 2015 at 09:21:24AM +0100, Jens Wiklander wrote:
> Switch to use a generic interface for issuing SMC/HVC based on ARM SMC
> Calling Convention. Removes now the now unused psci-call.S.
>
> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
> ---
> arch/arm/kernel/Makefile | 1 -
> arch/arm/kernel/psci-call.S | 31 -------------------------------
> arch/arm64/kernel/Makefile | 2 +-
> arch/arm64/kernel/psci-call.S | 28 ----------------------------
> drivers/firmware/psci.c | 21 +++++++++++++++++++--
> 5 files changed, 20 insertions(+), 63 deletions(-)
> delete mode 100644 arch/arm/kernel/psci-call.S
> delete mode 100644 arch/arm64/kernel/psci-call.S
[...]
> diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
> index 42700f0..53c9606 100644
> --- a/drivers/firmware/psci.c
> +++ b/drivers/firmware/psci.c
> @@ -19,6 +19,7 @@
> #include <linux/pm.h>
> #include <linux/printk.h>
> #include <linux/psci.h>
> +#include <linux/arm-smccc.h>
> #include <linux/reboot.h>
>
> #include <uapi/linux/psci.h>
> @@ -56,8 +57,6 @@ struct psci_operations psci_ops;
>
> typedef unsigned long (psci_fn)(unsigned long, unsigned long,
> unsigned long, unsigned long);
> -asmlinkage psci_fn __invoke_psci_fn_hvc;
> -asmlinkage psci_fn __invoke_psci_fn_smc;
> static psci_fn *invoke_psci_fn;
>
> enum psci_function {
> @@ -70,6 +69,24 @@ enum psci_function {
>
> static u32 psci_function_id[PSCI_FN_MAX];
>
> +static unsigned long __invoke_psci_fn_hvc(unsigned long a0, unsigned long a1,
> + unsigned long a2, unsigned long a3)
Minor comment, but could we keep these argument names the same as before
please?
> +{
> + struct smccc_res res;
> +
> + smccc_hvc(a0, a1, a2, a3, 0, 0, 0, 0, &res);
It's slightly tempting to use varargs instead of the '0' argument padding,
but that will probably make the asm code unmanageable.
Will
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Jens Wiklander <jens.wiklander@linaro.org> |
|---|---|
| Date | 2015-11-02 14:10 +0100 |
| Message-ID | <qqn25-5Jb-85@gated-at.bofh.it> |
| In reply to | #1260584 |
On Mon, Nov 02, 2015 at 11:55:39AM +0000, Will Deacon wrote:
> On Thu, Oct 29, 2015 at 09:21:24AM +0100, Jens Wiklander wrote:
> > Switch to use a generic interface for issuing SMC/HVC based on ARM SMC
> > Calling Convention. Removes now the now unused psci-call.S.
> >
> > Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
> > ---
> > arch/arm/kernel/Makefile | 1 -
> > arch/arm/kernel/psci-call.S | 31 -------------------------------
> > arch/arm64/kernel/Makefile | 2 +-
> > arch/arm64/kernel/psci-call.S | 28 ----------------------------
> > drivers/firmware/psci.c | 21 +++++++++++++++++++--
> > 5 files changed, 20 insertions(+), 63 deletions(-)
> > delete mode 100644 arch/arm/kernel/psci-call.S
> > delete mode 100644 arch/arm64/kernel/psci-call.S
>
> [...]
>
> > diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
> > index 42700f0..53c9606 100644
> > --- a/drivers/firmware/psci.c
> > +++ b/drivers/firmware/psci.c
> > @@ -19,6 +19,7 @@
> > #include <linux/pm.h>
> > #include <linux/printk.h>
> > #include <linux/psci.h>
> > +#include <linux/arm-smccc.h>
> > #include <linux/reboot.h>
> >
> > #include <uapi/linux/psci.h>
> > @@ -56,8 +57,6 @@ struct psci_operations psci_ops;
> >
> > typedef unsigned long (psci_fn)(unsigned long, unsigned long,
> > unsigned long, unsigned long);
> > -asmlinkage psci_fn __invoke_psci_fn_hvc;
> > -asmlinkage psci_fn __invoke_psci_fn_smc;
> > static psci_fn *invoke_psci_fn;
> >
> > enum psci_function {
> > @@ -70,6 +69,24 @@ enum psci_function {
> >
> > static u32 psci_function_id[PSCI_FN_MAX];
> >
> > +static unsigned long __invoke_psci_fn_hvc(unsigned long a0, unsigned long a1,
> > + unsigned long a2, unsigned long a3)
>
> Minor comment, but could we keep these argument names the same as before
> please?
You mean function_id, arg0, arg1... instead? I guess I should update
arm-smccc.h also then.
>
> > +{
> > + struct smccc_res res;
> > +
> > + smccc_hvc(a0, a1, a2, a3, 0, 0, 0, 0, &res);
>
> It's slightly tempting to use varargs instead of the '0' argument padding,
> but that will probably make the asm code unmanageable.
Agree.
Thanks,
Jens
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Will Deacon <will.deacon@arm.com> |
|---|---|
| Date | 2015-11-02 14:50 +0100 |
| Message-ID | <qqnEK-5VS-17@gated-at.bofh.it> |
| In reply to | #1260636 |
On Mon, Nov 02, 2015 at 02:08:26PM +0100, Jens Wiklander wrote:
> On Mon, Nov 02, 2015 at 11:55:39AM +0000, Will Deacon wrote:
> > On Thu, Oct 29, 2015 at 09:21:24AM +0100, Jens Wiklander wrote:
> > > Switch to use a generic interface for issuing SMC/HVC based on ARM SMC
> > > Calling Convention. Removes now the now unused psci-call.S.
> > >
> > > Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
> > > ---
> > > arch/arm/kernel/Makefile | 1 -
> > > arch/arm/kernel/psci-call.S | 31 -------------------------------
> > > arch/arm64/kernel/Makefile | 2 +-
> > > arch/arm64/kernel/psci-call.S | 28 ----------------------------
> > > drivers/firmware/psci.c | 21 +++++++++++++++++++--
> > > 5 files changed, 20 insertions(+), 63 deletions(-)
> > > delete mode 100644 arch/arm/kernel/psci-call.S
> > > delete mode 100644 arch/arm64/kernel/psci-call.S
> >
> > [...]
> >
> > > diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
> > > index 42700f0..53c9606 100644
> > > --- a/drivers/firmware/psci.c
> > > +++ b/drivers/firmware/psci.c
> > > @@ -19,6 +19,7 @@
> > > #include <linux/pm.h>
> > > #include <linux/printk.h>
> > > #include <linux/psci.h>
> > > +#include <linux/arm-smccc.h>
> > > #include <linux/reboot.h>
> > >
> > > #include <uapi/linux/psci.h>
> > > @@ -56,8 +57,6 @@ struct psci_operations psci_ops;
> > >
> > > typedef unsigned long (psci_fn)(unsigned long, unsigned long,
> > > unsigned long, unsigned long);
> > > -asmlinkage psci_fn __invoke_psci_fn_hvc;
> > > -asmlinkage psci_fn __invoke_psci_fn_smc;
> > > static psci_fn *invoke_psci_fn;
> > >
> > > enum psci_function {
> > > @@ -70,6 +69,24 @@ enum psci_function {
> > >
> > > static u32 psci_function_id[PSCI_FN_MAX];
> > >
> > > +static unsigned long __invoke_psci_fn_hvc(unsigned long a0, unsigned long a1,
> > > + unsigned long a2, unsigned long a3)
> >
> > Minor comment, but could we keep these argument names the same as before
> > please?
>
> You mean function_id, arg0, arg1... instead? I guess I should update
> arm-smccc.h also then.
No; I think just updating the psci caller to use those, but leave the
SMCCC low-level details as they are. The latter is just pushing data,
whilst the former has some (albeit limited) knowledge of what those
values represent.
Will
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web