From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755270AbcHVNnu (ORCPT ); Mon, 22 Aug 2016 09:43:50 -0400 Received: from foss.arm.com ([217.140.101.70]:52692 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932385AbcHVNnP (ORCPT ); Mon, 22 Aug 2016 09:43:15 -0400 Date: Mon, 22 Aug 2016 14:43:14 +0100 From: Will Deacon To: Andy Gross Cc: linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Catalin Marinas , Srinivas Kandagatla , Stephen Boyd , stanimir.varbanov@linaro.org, linux-kernel@vger.kernel.org, patches@linaro.org, Bjorn Andersson , lorenzo.pieralisi@arm.com, sudeep.holla@arm.com Subject: Re: [PATCH 1/2] arm64: kernel: Add SMC Session ID to results Message-ID: <20160822134313.GJ14680@arm.com> References: <1471672274-19317-1-git-send-email-andy.gross@linaro.org> <1471672274-19317-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: <1471672274-19317-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 Sat, Aug 20, 2016 at 12:51:13AM -0500, Andy Gross wrote: > This patch adds the SMC Session ID to the results passed back from SMC > calls. The Qualcomm SMC implementation provides for interrupted SMC > functions. When this occurs, the SMC call will return a session ID that > is required to be used when resuming the interrupted SMC call. > > Signed-off-by: Andy Gross > --- > arch/arm64/kernel/asm-offsets.c | 1 + > arch/arm64/kernel/smccc-call.S | 1 + > include/linux/arm-smccc.h | 4 +++- > 3 files changed, 5 insertions(+), 1 deletion(-) [...] > diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h > index b5abfda..82d919f 100644 > --- a/include/linux/arm-smccc.h > +++ b/include/linux/arm-smccc.h > @@ -63,18 +63,20 @@ > /** > * struct arm_smccc_res - Result from SMC/HVC call > * @a0-a3 result values from registers 0 to 3 > + * @a6 Session ID register (optional) > */ > struct arm_smccc_res { > unsigned long a0; > unsigned long a1; > unsigned long a2; > unsigned long a3; > + unsigned long a6; > }; > > /** > * arm_smccc_smc() - make SMC calls > * @a0-a7: arguments passed in registers 0 to 7 > - * @res: result values from registers 0 to 3 > + * @res: result values from registers 0 to 3 and optional register 6 AFAICT from reading the SMCCC spec, parameter register 6 is "Unpredictable, Scratch registers" in return state, so I don't think this is correct. What am I missing? Will