From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753882AbbKBL4B (ORCPT ); Mon, 2 Nov 2015 06:56:01 -0500 Received: from foss.arm.com ([217.140.101.70]:50596 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753713AbbKBLzm (ORCPT ); Mon, 2 Nov 2015 06:55:42 -0500 Date: Mon, 2 Nov 2015 11:55:39 +0000 From: Will Deacon To: Jens Wiklander Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Arnd Bergmann , Greg Kroah-Hartman , Kees Cook , valentin.manea@huawei.com, jean-michel.delorme@st.com, emmanuel.michel@st.com, javier@javigon.com, Jason Gunthorpe , Mark Rutland , Michal Simek , Rob Herring Subject: Re: [PATCH v6 2/6] drivers: psci: replace psci firmware calls Message-ID: <20151102115539.GC29657@arm.com> References: <1446106888-8983-1-git-send-email-jens.wiklander@linaro.org> <1446106888-8983-3-git-send-email-jens.wiklander@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1446106888-8983-3-git-send-email-jens.wiklander@linaro.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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 > #include > #include > +#include > #include > > #include > @@ -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