Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp410678rwn; Thu, 8 Sep 2022 03:38:33 -0700 (PDT) X-Google-Smtp-Source: AA6agR4B/d2EC2/biD1h1laRMPM0Eoj4yC1g3jSr4wSgIRVkZQ8LzZgUeDEn8EYa1pp4MR6x+ZhV X-Received: by 2002:a05:6a00:1308:b0:53a:9663:1c19 with SMTP id j8-20020a056a00130800b0053a96631c19mr8794529pfu.60.1662633512692; Thu, 08 Sep 2022 03:38:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662633512; cv=none; d=google.com; s=arc-20160816; b=iVl3sfIE1DLoZIeIPTuyEaMxDJnTjod8003QBMAJlbWDKpxrUyeMke4ZCI3CqgHMOA kFUyynKEWpl60OisxDLH9EVMJdeMU9IVh8Rs0Dbi8I1rhfxwBytmmhZdu1/scqTROA3R 6f09td1H1yQzYww7OkMGivy/dDadYQKIKBJk46WNhIOM4itKGUXLNNDTvUf/1TJ0fSIM 1PbH1R29mPxa2Rtq3HIYZJqEaCtLlfe3LmNBLUdIOUcI36UdmO12hd6f03s+/vduUk99 R7Jo5+0YwHczE9zP60jTdy/sg5B3hdLIjg56t52bJv2O1P6nkg8HftxyEoTkI6se5H6U wuxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=TIIxIsAjXY/VeC3psAlFhyf73BMTwmoi8wrLL+lsjHE=; b=h6FuMM+pkU5B5btd5I9hqEKSOX/o+1ApZWf3K+rc742jAic5V9KmKpdCYKDgvsQ1tE QDIVOZQH27+Snsrpwz2jK18xlDsHJTy+W1dAFO1KYpyq8ETAAqVcde6rcwVRINA5FAro 4fS52qvcqA3s6RI+6U9K7WbdEiYRJow0L+W3LABAxZFf6d4rUJCImimHvqZL518DXnUy NkI5r8+gVTbr/N0KyjqXRxsiL7ZW3EFnCBSdVAy3Ej33q2hsOjUxFc1uugns6a4eOPX9 Q1shrOL8JSFYEVHBPuUDRrCK/FDWzEzxxubHeJitR/yXsdgsFy6daJAs+idpQpcDDYT3 y1mQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s201-20020a632cd2000000b0042c011b9ad5si18745916pgs.871.2022.09.08.03.38.20; Thu, 08 Sep 2022 03:38:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230390AbiIHKZy (ORCPT + 99 others); Thu, 8 Sep 2022 06:25:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230476AbiIHKZu (ORCPT ); Thu, 8 Sep 2022 06:25:50 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C0E5D76747 for ; Thu, 8 Sep 2022 03:25:46 -0700 (PDT) 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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