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 5D8A3C433F5 for ; Thu, 25 Nov 2021 18:27:31 +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=J2Dqw/NosSbtHIMXIPSN763ia88598jIqB5hMIN5UoU=; b=t3HxYEDYmjv3dS 3oEuZrPUuSJEN8JksXi2pSl5pSwDvLwM0TFv+KdvNZL9wXBF++qupbXk2WVJmftFy8qDlAx1R+78M tbw+kk5BELmcpucoDvO4jzCTbjZlgn+dEFpKdmCyos2Ak3TZeemrV2i8dFtz2Nt8qA8HMZQHyY3cj sjhhewdx70lYS4t9ZtqH+hWxcACfWfo1p5KnG8XThXT362CtP6nBbhltA/++IEwFEFaPQWv2ic8os LdjmetgCSykNLLGzvK9H6DzizgcPR1THs5ZjnUFdKtn8PDa7SUf13kLygRmPdi9KlR33x049NBwsj l/HrFa1wFgNl4onxNeaA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqJRX-008SXD-1C; Thu, 25 Nov 2021 18:25:59 +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 1mqJRT-008SWF-Dm for linux-arm-kernel@lists.infradead.org; Thu, 25 Nov 2021 18:25:56 +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 05EA71FB; Thu, 25 Nov 2021 10:25:47 -0800 (PST) Received: from e120937-lin (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 32DB53F73B; Thu, 25 Nov 2021 10:25:46 -0800 (PST) Date: Thu, 25 Nov 2021 18:25:43 +0000 From: Cristian Marussi To: Sudeep Holla Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Vincent Guittot , Etienne Carriere Subject: Re: [PATCH] firmware: arm_scmi: optee: Drop the support for the OPTEE shared dynamic buffer Message-ID: <20211125182543.GE56473@e120937-lin> References: <20211125150730.188487-1-sudeep.holla@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211125150730.188487-1-sudeep.holla@arm.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211125_102555_580704_19C74E7A X-CRM114-Status: GOOD ( 18.02 ) 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, Nov 25, 2021 at 03:07:30PM +0000, Sudeep Holla wrote: > The shared memory buffer allocated by the optee driver is normal cached > memory and can't be used with IOMEM APIs used in shmem_*. > > We currently support only IO memory for shared memory and supporting > normal cached memory needs more changes and needs to be thought through > properly. So for now, let us drop the support for this OPTEE shared buffer. > > Cc: Cristian Marussi > Cc: Etienne Carriere > Signed-off-by: Sudeep Holla > --- Hi, > drivers/firmware/arm_scmi/optee.c | 19 +------------------ > 1 file changed, 1 insertion(+), 18 deletions(-) > > diff --git a/drivers/firmware/arm_scmi/optee.c b/drivers/firmware/arm_scmi/optee.c > index 901737c9f5f8..175b39bcd470 100644 > --- a/drivers/firmware/arm_scmi/optee.c > +++ b/drivers/firmware/arm_scmi/optee.c > @@ -282,23 +282,6 @@ static void scmi_optee_clear_channel(struct scmi_chan_info *cinfo) > shmem_clear_channel(channel->shmem); > } > > -static int setup_dynamic_shmem(struct device *dev, struct scmi_optee_channel *channel) > -{ > - const size_t msg_size = SCMI_OPTEE_MAX_MSG_SIZE; > - > - channel->tee_shm = tee_shm_alloc_kernel_buf(scmi_optee_private->tee_ctx, msg_size); > - if (IS_ERR(channel->tee_shm)) { > - dev_err(channel->cinfo->dev, "shmem allocation failed\n"); > - return -ENOMEM; > - } > - > - channel->shmem = (void *)tee_shm_get_va(channel->tee_shm, 0); > - memset(channel->shmem, 0, msg_size); > - shmem_clear_channel(channel->shmem); > - > - return 0; > -} > - > static int setup_static_shmem(struct device *dev, struct scmi_chan_info *cinfo, > struct scmi_optee_channel *channel) > { > @@ -342,7 +325,7 @@ static int setup_shmem(struct device *dev, struct scmi_chan_info *cinfo, > if (of_find_property(cinfo->dev->of_node, "shmem", NULL)) > return setup_static_shmem(dev, cinfo, channel); > else > - return setup_dynamic_shmem(dev, channel); > + return -ENOMEM; > } > LGTM. Reviewed-by: Cristian Marussi Thanks, Cristian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel