Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp857625pxf; Thu, 25 Mar 2021 16:03:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXseplFyaR9VYDEP8uhhMGBmEKzeqcFI32/INJobQ3iSaN31y/Mm6+JyCkZXyURTokaR3c X-Received: by 2002:a17:906:5203:: with SMTP id g3mr11752469ejm.95.1616713427796; Thu, 25 Mar 2021 16:03:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616713427; cv=none; d=google.com; s=arc-20160816; b=E358w48Jw/UDjlUCxLL5WUNqs+oRUy+tpol6ZKC4bRlFuW8deMEizBoP8WqR1K9ClZ Qei3V7nq3AscNYFUahDOHTIZgNPkNBKJ8ORuT5b4GelxKKnURoUVkDjZdEO6HcxlNk1p NlHpff/WmBpvMWxg7p8xFfsZbGEK0WTu0CqiqxtrIZ++ix9AwHJ1pmZDu1EAD1GYvJCf ZAP8P/fERkm0aj/Oor/Fz7HXU/nL4ltOhMBnIz4RWh+gYvnWI56WDj+tJlngJw95Eeyh DD01Is4clOpsC/XLyTadi/xXd3gZ0JuROthW8Gxr3TvSBhVvKrwvFj4jPOfd90OJ+OIS 2BSA== 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:dkim-signature; bh=NYtrjNLVWQTr/dq5ZWJC4E1PqUHmp98t32XFTCKiVw4=; b=b5M7p0MGbYviRMkW0uLdbr4aWgkGNPTw8NkJHJnQ9evn60oN8+nBnq4dBBN+Ip2qep mXFc8Ow56O8Y6lopyAEFXFvNfCv52Jg47HYI4Rfa3WVx/PQaNvCjjEjpMfDEGd1TpCRC I+6tlVxEgbRNm7wqkgOd1cP1hnnrXd7Ye0gXWa+iF2buYLJBdZu+snA+1F63FLnYKmEp BxYRXi/+xS44l8F2KSjwugDL9D4OZkqGZ6XPb7m84/kxVyC2PHI/m8vXNFkWIb2nhYvm K9RnQ5sJVtbuCHzSSJP7VAAiBQASOtcjXFxdktbuPJQmkk2DquGc4qfN+/vadLV5ndnp iLmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EZmqD8jx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rp14si5586672ejb.435.2021.03.25.16.03.24; Thu, 25 Mar 2021 16:03:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EZmqD8jx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231262AbhCYXBW (ORCPT + 99 others); Thu, 25 Mar 2021 19:01:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231191AbhCYXAu (ORCPT ); Thu, 25 Mar 2021 19:00:50 -0400 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2102C06174A for ; Thu, 25 Mar 2021 16:00:49 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id y5so3600707pfn.1 for ; Thu, 25 Mar 2021 16:00:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=NYtrjNLVWQTr/dq5ZWJC4E1PqUHmp98t32XFTCKiVw4=; b=EZmqD8jxmBdlgeO8EZfB3JDqfJgcDTb2IC+XJ4WgJherysg5+d+VrBiP1bRB/J6gai iq+bZmftHKnQiXYr9d7eBdUTXkLaRGYv0U983t6Usk8Dsuq+ou5WiS1TLizGOl6Ec+J+ Bvk/Yz5W80G3YVgJMpNz7nSR8y1/G318t/iLk7y3oOZUYFbBdqLdndcQms9GLeKNJCyH DcH3qvHPg4NgUbNW5JqbzJdV1Nbq2ceomWP7PCS5PozXk/AiNyIO2sUiWs63qd8Au6Vj BYfsWoWk9tlUdVSjKhoeUoR+SWjYjvp7/3pYjA6MgpzoDEtQQBK3Uw+tAcCFfGdiG0pw Ff0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=NYtrjNLVWQTr/dq5ZWJC4E1PqUHmp98t32XFTCKiVw4=; b=qa+tMMzDAEwnKfOJIlvrZreB1fEZjR2m7rsXfl7gT5ddnyviNIr6pBzzjRGnNTg4pg SxzVvGwEB/ND9hUolvJGyDWXmioJcKlrxflTHun0ZSOpI6uW74qQW4kwjWEcCX/3P7Ib RgfMYkoqa2HvdSt2CDOka893avxm7SraiBuj0c3azVk1+nFYpbKzS7fqcxmtMdCv9Lj4 zCmC1iL0jAfp0dhrTbsARf/QuvtfGU4sNMZtO+rhG2aDmVA8le+/7at+A9fwk33b7PRx mYQBEz93bk7mpxZFxFl2NJgbT8MVBhBr/WndYfaG1eht0c4HIgx/h3JcjYOY39X7fQIR 78mg== X-Gm-Message-State: AOAM5320UWyJ7MT5DmD9aEMCdaC3ejQt55FGRHDNVXrZZh6xJx8Ve3B2 mMz7PmJ1ymgIeROCQnlUbenl8A== X-Received: by 2002:aa7:86c1:0:b029:203:900:2813 with SMTP id h1-20020aa786c10000b029020309002813mr9748625pfo.35.1616713249127; Thu, 25 Mar 2021 16:00:49 -0700 (PDT) Received: from xps15 (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id c6sm6810901pfj.99.2021.03.25.16.00.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Mar 2021 16:00:44 -0700 (PDT) Date: Thu, 25 Mar 2021 17:00:42 -0600 From: Mathieu Poirier To: "Peng Fan (OSS)" Cc: ohad@wizery.com, bjorn.andersson@linaro.org, o.rempel@pengutronix.de, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan Subject: Re: [PATCH 1/2] remoteproc: imx_rproc: enlarge IMX7D_RPROC_MEM_MAX Message-ID: <20210325230042.GB1982573@xps15> References: <20210319104708.7754-1-peng.fan@oss.nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210319104708.7754-1-peng.fan@oss.nxp.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peng, On Fri, Mar 19, 2021 at 06:47:07PM +0800, Peng Fan (OSS) wrote: > From: Peng Fan > > 8 is not enough when we need more, so enlarge IMX7D_RPROC_MEM_MAX to 32, > and also rename it to IMX_RPROC_MEM_MAX which make more sense. > > Signed-off-by: Peng Fan > --- > drivers/remoteproc/imx_rproc.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c > index 6d3207ccbaef..24275429a7cc 100644 > --- a/drivers/remoteproc/imx_rproc.c > +++ b/drivers/remoteproc/imx_rproc.c > @@ -48,7 +48,7 @@ > | IMX6SX_SW_M4C_NON_SCLR_RST \ > | IMX6SX_SW_M4C_RST) > > -#define IMX7D_RPROC_MEM_MAX 8 > +#define IMX_RPROC_MEM_MAX 32 The size of structure imx_rproc_att_imx7d and imx_rproc_att_imx6sx have not changed nor has there been an addition of new imx_rproc_att that would justify the change. It seems to me you are working on something internally and this patch is in preparation for that. If that is the case then please resubmit this patch with the rest of the code. Thanks, Mathieu > > /** > * struct imx_rproc_mem - slim internal memory structure > @@ -88,7 +88,7 @@ struct imx_rproc { > struct regmap *regmap; > struct rproc *rproc; > const struct imx_rproc_dcfg *dcfg; > - struct imx_rproc_mem mem[IMX7D_RPROC_MEM_MAX]; > + struct imx_rproc_mem mem[IMX_RPROC_MEM_MAX]; > struct clk *clk; > struct mbox_client cl; > struct mbox_chan *tx_ch; > @@ -272,7 +272,7 @@ static void *imx_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *i > if (imx_rproc_da_to_sys(priv, da, len, &sys)) > return NULL; > > - for (i = 0; i < IMX7D_RPROC_MEM_MAX; i++) { > + for (i = 0; i < IMX_RPROC_MEM_MAX; i++) { > if (sys >= priv->mem[i].sys_addr && sys + len < > priv->mem[i].sys_addr + priv->mem[i].size) { > unsigned int offset = sys - priv->mem[i].sys_addr; > @@ -425,7 +425,7 @@ static int imx_rproc_addr_init(struct imx_rproc *priv, > if (!(att->flags & ATT_OWN)) > continue; > > - if (b >= IMX7D_RPROC_MEM_MAX) > + if (b >= IMX_RPROC_MEM_MAX) > break; > > priv->mem[b].cpu_addr = devm_ioremap(&pdev->dev, > @@ -459,7 +459,7 @@ static int imx_rproc_addr_init(struct imx_rproc *priv, > return err; > } > > - if (b >= IMX7D_RPROC_MEM_MAX) > + if (b >= IMX_RPROC_MEM_MAX) > break; > > /* Not use resource version, because we might share region */ > -- > 2.30.0 >