Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp5524644rwb; Wed, 7 Sep 2022 04:21:34 -0700 (PDT) X-Google-Smtp-Source: AA6agR7GX0+bXm8mWFNBCwV0Czb7/lOHG2o/Otk3oIvE4sTMS3E/0Cua2XxYbp4sKZHErYbh+4Bb X-Received: by 2002:a17:902:7c8f:b0:176:cdd8:7258 with SMTP id y15-20020a1709027c8f00b00176cdd87258mr3324853pll.49.1662549694446; Wed, 07 Sep 2022 04:21:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662549694; cv=none; d=google.com; s=arc-20160816; b=pIBy5zzWjWlrQ49cZirt/xAApsi/W44cBhThsspEx7mOnA/tlAeIqTJKGAYXw2T0DI E5exExkC/cNagRmirZU0C26QyuQFT1kpZd38daW3otcc8aw/GFy+O9s0GIgoaJVNAeB2 NoROsu+t0K4LiFgUNORlxpdPvmZFpGz4ImBvz4PKEb/OXV5yv+dq4irrFyC5zMqay/4s ZHg1WLgHHJ8bw/IRsKzh1OIZb6Gfnjt9fxQG/8xvlEDL24dD3kefUt91/hGFmFdkXIeL VdHtzVBRnnmmjBrBGBLqg17R6R3wZmorl8+4JdqqIdwOlRJvt0GKC/205weN0LZ8LBao OY5w== 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=+KP9Z1x0M7rf43N2A97FjxVp99LY/tcTFMTh8hQctyY=; b=m0fT1zL9+is8kiuVfnqevn+ipBVsXyQTUt49C/Thi3ydF9i62MyrbwgtxCh71FiEE7 SpfEXrl5Vwizcy70azmQkeYGmwHV7QgvihObRw5D4VSDP7ZVVgSwbaIoQuLp28Pl4e+w tZYWZ015PBE+VJBQIixwiVz57CMTKsBQbOH52UgskyG3JgYuarc4MigXlNX5pqVlz/Cy e2SROkOmkQYbQ1t67tSFBMuoX/EcId8MSaDq4H3huw7ac/y6kDPcrkmTYbhmzS80iNSb llIvusFZckSYaJ+z1xNGQCc4ummtVFNwxsLE2uaLWromVZgA3Fd2tizIuALK8aWjpYdu 08HQ== 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 b8-20020a637148000000b0042a560b1cd2si6250777pgn.248.2022.09.07.04.21.19; Wed, 07 Sep 2022 04:21:34 -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 S229534AbiIGLBu (ORCPT + 99 others); Wed, 7 Sep 2022 07:01:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229478AbiIGLBs (ORCPT ); Wed, 7 Sep 2022 07:01:48 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E77CFA00C3 for ; Wed, 7 Sep 2022 04:01:47 -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 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-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 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