From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964930AbdADRoO (ORCPT ); Wed, 4 Jan 2017 12:44:14 -0500 Received: from foss.arm.com ([217.140.101.70]:55152 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757954AbdADRnJ (ORCPT ); Wed, 4 Jan 2017 12:43:09 -0500 Date: Wed, 4 Jan 2017 17:33:52 +0000 From: Will Deacon To: Andy Gross Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, lorenzo.pieralisi@arm.com, Kevin Hilman , Srinivas Kandagatla , Bjorn Andersson , linux@armlinux.org.uk Subject: Re: [Patch v2 1/2] arm: kernel: Add SMC structure parameter Message-ID: <20170104173352.GO18193@arm.com> References: <1483054046-3327-1-git-send-email-andy.gross@linaro.org> <1483054046-3327-2-git-send-email-andy.gross@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1483054046-3327-2-git-send-email-andy.gross@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, Dec 29, 2016 at 05:27:25PM -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. The current arm_smccc_smc is renamed and macros are used > instead to specify the standard arm_smccc_smc or the arm_smccc_smc_quirk > function. > > This patch and partial implementation was suggested by Will Deacon. > > Signed-off-by: Andy Gross > --- > arch/arm/kernel/armksyms.c | 2 +- > arch/arm/kernel/smccc-call.S | 7 ++++--- > arch/arm64/kernel/arm64ksyms.c | 2 +- > arch/arm64/kernel/asm-offsets.c | 7 +++++-- > arch/arm64/kernel/smccc-call.S | 7 ++++--- > include/linux/arm-smccc.h | 28 ++++++++++++++++++++++++---- > 6 files changed, 39 insertions(+), 14 deletions(-) [...] > @@ -101,4 +115,10 @@ asmlinkage void arm_smccc_hvc(unsigned long a0, unsigned long a1, > unsigned long a5, unsigned long a6, unsigned long a7, > struct arm_smccc_res *res); > > +#define arm_smccc_smc(a0, a1, a2, a3, a4, a5, a6, a7, res) \ > + __arm_smccc_smc(a0, a1, a2, a3, a4, a5, a6, a7, res, NULL) > + > +#define arm_smccc_smc_quirk(a0, a1, a2, a3, a4, a5, a6, a7, res, quirk) \ > + __arm_smccc_smc(a0, a1, a2, a3, a4, a5, a6, a7, res, quirk) This might be a bit cleaner with a variadic macro, but either way: Reviewed-by: Will Deacon Will