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 5617FC54734 for ; Tue, 27 Aug 2024 12:51:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Transfer-Encoding:Content-Type: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=278xC9Tq4ugKZmM2cD9xcOk9w5uV9J2QlPzHuWUkrPA=; b=JmJ3hxHj4JeLjviUxEp08vM1Mj xGqdi4P7JY/ii/tvzK+jBmX3CqOdVb9HrBIud4hZZsP/fmUhxfV+zybo5IBg63MnHjjxWxmcxLrpr V3y2w0c2hYN6gKv4B4vgJDsmX+OHmAgY5+5Qhy5SPFayauzeZCEiaFGWAXIKu0CY7DRYTwGrVNcAs hNOeVXnvzDRKoluvmi3RxwNVE5vVpBfBY4RBOquI7gsguKgJVyoWEbKCM1zbx6Op58yWPQVZsdLXj udFEY4DnPImbB6BSUSmOeM4qiYzT6RO57iDGbV/4aAZJag3QyTfdTy2iYVnbMmjkz81b+XZ7+ivb9 KQ5xPYLA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sivfU-0000000BKYK-3lEo; Tue, 27 Aug 2024 12:51:29 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sivbW-0000000BJ6G-2vyP for linux-arm-kernel@lists.infradead.org; Tue, 27 Aug 2024 12:47:24 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id BD2CCA41979; Tue, 27 Aug 2024 12:47:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4D95C4FF6C; Tue, 27 Aug 2024 12:47:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724762841; bh=0sd4Bxi4i+Qdbg9yXamzmuyf7Qb4bpTqEafzYbKvJsI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gVkBjnY/oeu8AgEk02EVcnU5S8GN0oumlt+4m7TRZhdmSV8uPefA8DTHJlfh2hnII emruP8nvobs6vGPIlnumQlUxv5jeHtilssMFg/FcYpK3L34OdHb3GuNc6d8zMCiR1x ztHzMM6AZ2mU4DbkuyF+2ptpwhTamm1k5bgrPEIPppCoSmKdLkvn6BHEoRa7t1at3j JPa92QFnBlRTtlVcIE1l6C4xiCswLG2aGwC03TxyQjifuCaK79U1ECxrYE3BYPbpfR mxgCAm2jqAJ/V13Hprh6eH+M9CHP5BE5CWFeWoev1a6DW/mDftHvplqC5xPi46hQm7 EyDKFB1KAiI4Q== Date: Tue, 27 Aug 2024 13:47:15 +0100 From: Will Deacon To: Bibek Kumar Patro Cc: robdclark@gmail.com, robin.murphy@arm.com, joro@8bytes.org, jgg@ziepe.ca, jsnitsel@redhat.com, robh@kernel.org, krzysztof.kozlowski@linaro.org, quic_c_gdjako@quicinc.com, dmitry.baryshkov@linaro.org, konrad.dybcio@linaro.org, iommu@lists.linux.dev, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v14 5/6] iommu/arm-smmu: add ACTLR data and support for SC7280 Message-ID: <20240827124714.GB4772@willie-the-truck> References: <20240816174259.2056829-1-quic_bibekkum@quicinc.com> <20240816174259.2056829-6-quic_bibekkum@quicinc.com> <20240823155918.GD525@willie-the-truck> <3ae75a75-1717-40b6-9149-bc3673d520d6@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3ae75a75-1717-40b6-9149-bc3673d520d6@quicinc.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240827_054722_896507_C5785310 X-CRM114-Status: GOOD ( 25.48 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Aug 26, 2024 at 04:33:24PM +0530, Bibek Kumar Patro wrote: > > > On 8/23/2024 9:29 PM, Will Deacon wrote: > > On Fri, Aug 16, 2024 at 11:12:58PM +0530, Bibek Kumar Patro wrote: > > > Add ACTLR data table for SC7280 along with support for > > > same including SC7280 specific implementation operations. > > > > > > Signed-off-by: Bibek Kumar Patro > > > --- > > > drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 58 +++++++++++++++++++++- > > > 1 file changed, 57 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c > > > index dc143b250704..a776c7906c76 100644 > > > --- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c > > > +++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c > > > @@ -31,6 +31,55 @@ > > > #define PREFETCH_MODERATE (2 << PREFETCH_SHIFT) > > > #define PREFETCH_DEEP (3 << PREFETCH_SHIFT) > > > > > > +static const struct actlr_config sc7280_apps_actlr_cfg[] = { > > > + { 0x0800, 0x04e0, PREFETCH_DEFAULT | CMTLB }, > > > + { 0x0900, 0x0402, PREFETCH_SHALLOW | CPRE | CMTLB }, > > > + { 0x0901, 0x0000, PREFETCH_SHALLOW | CPRE | CMTLB }, > > > + { 0x0d01, 0x0000, PREFETCH_SHALLOW | CPRE | CMTLB }, > > > + { 0x1181, 0x0420, PREFETCH_DEEP | CPRE | CMTLB }, > > > + { 0x1182, 0x0420, PREFETCH_DEEP | CPRE | CMTLB }, > > > + { 0x1183, 0x0420, PREFETCH_DEEP | CPRE | CMTLB }, > > > + { 0x1184, 0x0420, PREFETCH_DEEP | CPRE | CMTLB }, > > > + { 0x1185, 0x0420, PREFETCH_DEEP | CPRE | CMTLB }, > > > + { 0x1186, 0x0420, PREFETCH_DEEP | CPRE | CMTLB }, > > > + { 0x1187, 0x0420, PREFETCH_DEEP | CPRE | CMTLB }, > > > + { 0x1188, 0x0420, PREFETCH_DEEP | CPRE | CMTLB }, > > > + { 0x1189, 0x0420, PREFETCH_DEEP | CPRE | CMTLB }, > > > + { 0x118b, 0x0420, PREFETCH_DEEP | CPRE | CMTLB }, > > > + { 0x118c, 0x0420, PREFETCH_DEEP | CPRE | CMTLB }, > > > + { 0x118d, 0x0420, PREFETCH_DEEP | CPRE | CMTLB }, > > > + { 0x118e, 0x0420, PREFETCH_DEEP | CPRE | CMTLB }, > > > + { 0x118f, 0x0420, PREFETCH_DEEP | CPRE | CMTLB }, > > > + { 0x2000, 0x0020, PREFETCH_DEFAULT | CMTLB }, > > > + { 0x2040, 0x0000, PREFETCH_DEFAULT | CMTLB }, > > > + { 0x2062, 0x0000, PREFETCH_DEFAULT | CMTLB }, > > > + { 0x2080, 0x0020, PREFETCH_DEFAULT | CMTLB }, > > > + { 0x20c0, 0x0020, PREFETCH_DEFAULT | CMTLB }, > > > + { 0x2100, 0x0020, PREFETCH_DEFAULT | CMTLB }, > > > + { 0x2140, 0x0000, PREFETCH_DEFAULT | CMTLB }, > > > + { 0x2180, 0x0020, PREFETCH_SHALLOW | CPRE | CMTLB }, > > > + { 0x2181, 0x0004, PREFETCH_SHALLOW | CPRE | CMTLB }, > > > + { 0x2183, 0x0000, PREFETCH_SHALLOW | CPRE | CMTLB }, > > > + { 0x2184, 0x0020, PREFETCH_SHALLOW | CPRE | CMTLB }, > > > + { 0x2187, 0x0000, PREFETCH_SHALLOW | CPRE | CMTLB }, > > > +}; > > > + > > > +static const struct actlr_config sc7280_gfx_actlr_cfg[] = { > > > + { 0x0000, 0x07ff, PREFETCH_DEEP | CPRE | CMTLB }, > > > +}; > > > > It's Will "stuck record" Deacon here again to say that I don't think > > this data belongs in the driver. > > > > Hi Will, > > It will be difficult to reach a consensus here, with Robin and the DT folks > okay to keep it in the driver, while you believe it doesn't belong there. > > Robin, Rob, could you please share your thoughts on concluding the placement > of this prefetch data? > > As discussed earlier [1], the prefetch value for each client doesn’t define > the hardware topology and is implementation-defined register writes used by > the software driver. It does reflect the hardware topology though, doesn't it? Those magic hex masks above refer to stream ids, so the table is hard-coding the prefetch values for particular matches. If I run on a different SoC configuration with the same table, then the prefetch settings will be applied to the wrong devices. How is that not hardware topology? WIll