From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 88D4CC54EE9 for ; Wed, 7 Sep 2022 11:03:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tEmGsoHw2QYlk3tHIj2eeZt44ooo7NhYPuw8o6Olqus=; b=QGH5qzI6PyErOE htCO8fX02GC/CRzLxzUUCp37VdXB2rYC+19pP0x/JHcWUn2oWAEWPMlKjXmzgh9ZS7shVZ1hfNL+t iFtY2rxULTLsRxtgVWU4ijw3n1SJDD4NMLj4G/qUtyBsjm12qUgYdeQw8NYIqRmIK8hTbJoKfqANv qj+AYYBraTMXECebcJvRUY14pzRT4fSKZdKp0nIx+LM8EvMVvaw4UEUVx5p9E7DPStIzvQ7sRx3MN ZEY8k/o15qOzPcQhOm146iYzCqKG1EhShJ7QrYFKrkKCV9ON+wRpj9S7tojtOWIcDIo3QLPqKgsjC zTxSv4Fiyx5Ghqr1qyYQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oVsod-005UGq-Th; Wed, 07 Sep 2022 11:01:56 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oVsoZ-005UDx-I9 for linux-arm-kernel@lists.infradead.org; Wed, 07 Sep 2022 11:01:53 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E6967106F; Wed, 7 Sep 2022 04:01:53 -0700 (PDT) Received: from bogus (unknown [10.57.45.93]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A05D43F7B4; Wed, 7 Sep 2022 04:01:45 -0700 (PDT) Date: Wed, 7 Sep 2022 12:01:42 +0100 From: Sudeep Holla To: Jens Wiklander Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, op-tee@lists.trustedfirmware.org, Marc Bonnici , Sudeep Holla , Achin Gupta , Valentin Laurent , Lukas Hanel , Coboy Chen Subject: Re: [PATCH v2 09/10] firmware: arm_ffa: Set up 32bit execution mode flag using partiion property Message-ID: <20220907110142.go33wifjqz7byji6@bogus> References: <20220902124032.788488-1-sudeep.holla@arm.com> <20220902124032.788488-10-sudeep.holla@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220907_040151_677740_511547E3 X-CRM114-Status: GOOD ( 24.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Sep 07, 2022 at 11:01:27AM +0200, Jens Wiklander wrote: > On Fri, Sep 2, 2022 at 2:40 PM Sudeep Holla wrote: > > > > FF-A v1.1 adds a flag in the partition properties to indicate if the > > partition runs in the AArch32 or AArch64 execution state. Use the same > > to set-up the 32-bit execution flag mode in the ffa_dev automatically > > and ignore any requests to do the same from the ffa_driver. > > > > Signed-off-by: Sudeep Holla > > --- > > drivers/firmware/arm_ffa/driver.c | 13 ++++++++++++- > > include/linux/arm_ffa.h | 2 ++ > > 2 files changed, 14 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c > > index dd6ab2f81580..dbbe15592173 100644 > > --- a/drivers/firmware/arm_ffa/driver.c > > +++ b/drivers/firmware/arm_ffa/driver.c > > @@ -647,11 +647,19 @@ static int ffa_partition_info_get(const char *uuid_str, > > return 0; > > } > > > > -static void ffa_mode_32bit_set(struct ffa_device *dev) > > +static void _ffa_mode_32bit_set(struct ffa_device *dev) > > { > > dev->mode_32bit = true; > > } > > > > +static void ffa_mode_32bit_set(struct ffa_device *dev) > > +{ > > + if (drv_info->version > FFA_VERSION_1_0) > > + return; > > + > > + _ffa_mode_32bit_set(dev); > > +} > > + > > static int ffa_sync_send_receive(struct ffa_device *dev, > > struct ffa_send_direct_data *data) > > { > > @@ -743,6 +751,9 @@ static void ffa_setup_partitions(void) > > __func__, tpbuf->id); > > continue; > > } > > + > > + if (tpbuf->properties & FFA_PARTITION_AARCH64_EXEC) > > Shouldn't this be !(tpbuf->properties & FFA_PARTITION_AARCH64_EXEC)? > > Before this, we used 64-bit calling convention by default for FF-A > v1.0. I suppose we would like to keep that behaviour. > Correct, it is stupid mistake on my part. I did notice this but somehow messed up not to add the change I made to test with OPTEE. Thanks for noticing this. -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel