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 3E75CECAAD5 for ; Thu, 8 Sep 2022 10:26:48 +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=NiegsGsZH7I3Hr/voGTdUqSRFdsSqEebQ5k8MNFbe7A=; b=njs0gvb5l4Zkn3 +BISJO0zTbs5V7osImZBQk/pz9gZ19jfqnZ36nJ8LAKrQEeSQjadhCWPD1AaZMRFlnFQzfk9HyRxZ t1TVkUmn6z+5QnDVjKmEl89AmWx7ADF87U1Jf3g//bXapbPzJfBcJnVbkCIsVs1bfvSWUwpRL9CA7 6/xLr60LqST5D8aB4T0c6g1OoTxDnMFjw/px4OhnTNNS47kRtC7aexbnLHQGCt960+n6BXUf+izcY rRIWwnc59oP7mhycoeqqMFNkLpb8ahiXoh8On7Ar7LWDhgjUtfuruiQnC6sCiVNyIEZ+HpYe8vXfN /TrLLzKCbcCGnSldNrdw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWEjI-002K9D-1E; Thu, 08 Sep 2022 10:25:52 +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 1oWEjF-002K8h-4y for linux-arm-kernel@lists.infradead.org; Thu, 08 Sep 2022 10:25:50 +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 0E5C514BF; Thu, 8 Sep 2022 03:25:53 -0700 (PDT) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7E6063F71A; Thu, 8 Sep 2022 03:25:45 -0700 (PDT) Date: Thu, 8 Sep 2022 11:25: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 , Achin Gupta , Valentin Laurent , Lukas Hanel , Coboy Chen Subject: Re: [PATCH v3 09/10] firmware: arm_ffa: Set up 32bit execution mode flag using partiion property Message-ID: <20220908102542.a3g22ecjepodtmud@bogus> References: <20220907145240.1683088-1-sudeep.holla@arm.com> <20220907145240.1683088-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-20220908_032549_258849_8D97DA60 X-CRM114-Status: GOOD ( 22.39 ) 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 Thu, Sep 08, 2022 at 12:08:00PM +0200, Jens Wiklander wrote: > On Wed, Sep 7, 2022 at 4:53 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 42bc22220c69..34e12a2a98fe 100644 > > --- a/drivers/firmware/arm_ffa/driver.c > > +++ b/drivers/firmware/arm_ffa/driver.c > > @@ -648,11 +648,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) > > { > > @@ -744,6 +752,9 @@ static void ffa_setup_partitions(void) > > __func__, tpbuf->id); > > continue; > > } > > + > > + if (!(tpbuf->properties & FFA_PARTITION_AARCH64_EXEC)) > > + _ffa_mode_32bit_set(ffa_dev); > > For FF-A 1.0 it looks like we change the dev->mode_32bit default value > from false to true. Or am I missing something? > You are right, was trying to avoid additional check on version but we need that to keep the behaviour unchanged. I will add the check. Thanks again for spotting this. -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel