Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp3091399rdb; Wed, 15 Nov 2023 22:52:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IHzPMRZkn0Mtdarijj5thTIYtN9ressjaloLOJ+aBbeF5fTEPSDSpsJbe8EhycTRk32lE8y X-Received: by 2002:a05:6a20:e30b:b0:187:6ff7:284f with SMTP id nb11-20020a056a20e30b00b001876ff7284fmr4407262pzb.34.1700117543607; Wed, 15 Nov 2023 22:52:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700117543; cv=none; d=google.com; s=arc-20160816; b=P/RJYlIhMRq5QjnwFzjL0GV+CNJRHzA9ncHFHIa+gkA5v5Pt4GtRjDnfsxVQWKCvpU Jpd0oq4iA/8i/SvNTBsN8ljS+l3nTNEGLcYd02ejadNxlb9fYY74NJwrzf9Iz+32f7Sz xvU2mlF+8SHR2uk9LZoIIh5XDnLoMQrB/HO1BxlF9Z2fK8WgjrLyL6prHHdrgh2pxH8C u5mK2l9YdjjUTtGmQ8kqzi9MzXwstnfcWZUfUIJonKs2XSLep5g7hKAwY+GRGBFmqGn3 R/aqW6izxKqyOjcflJI1hS7LUNKnlm1f31YnkTUL660+NyMpQw7doWdR91lHjalC1dS5 ldfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=oc5E6kIcla/Or4QU1XuvIaiW9BS0HQZyOIehNU3S8rI=; fh=kT/rkmUigpTKuV9sVhX0iuN7s3WKR64h9ptf7Njj9D4=; b=hKux2k6S9vr2PHT2+bTEjz90jRJNN5Wy6Az/HldfxklNgS4G3nAnNBxo9jC9+K0zp3 zmTOuyuXBQyn5EIanwjaTelk2cBu4nnKS9uf0BRvE5WQpLbs/M8QBiYT3D1/3+rMrFBX HwbCr0WpiRfj/mubLxlcqa5zcuMOs5eDEE4VD4KecMxegZNxvixqgQTtCNFwwQ7qNSB6 yRixlX2MuDgeFbNW1E59uNDDc2eN081B4tDhHPXg5DbbzpMivA3SyEG7BRuYT41fpGMp Q7Qg1Mtl+xG3Q/VdYz2WiElhy0ZotiZBePytRa2ZAi5ig6TI+kePrzwqlP1GkpUvuNeN SUkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JKPA8XAz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id n4-20020a170903110400b001c6189eaaebsi11839907plh.186.2023.11.15.22.52.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 22:52:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JKPA8XAz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 0FE708028939; Wed, 15 Nov 2023 22:52:20 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229919AbjKPGwN (ORCPT + 99 others); Thu, 16 Nov 2023 01:52:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229638AbjKPGwM (ORCPT ); Thu, 16 Nov 2023 01:52:12 -0500 Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A8AB196 for ; Wed, 15 Nov 2023 22:52:08 -0800 (PST) Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-59b5484fbe6so4878777b3.1 for ; Wed, 15 Nov 2023 22:52:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700117527; x=1700722327; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=oc5E6kIcla/Or4QU1XuvIaiW9BS0HQZyOIehNU3S8rI=; b=JKPA8XAzdAdGTJOuaT4K7qsHLB1F/NWQTD09BuxtbWnpcYajOZduXcgNWyCE8REp5Q V/0yxlsCnJnr1ACDz86vudGvbzhNYOGYTjPVxje9oFSoE05ZW777SwbA/uvNz1U270Db nkU8ygjZrPxdVYH7B2ep6LVYm5vn3TMWsiBltDhHwOtQObQKYMv2cvHRDfZKalbzjmmb 9t/U9HdNY8PmOlKtJUBN4UDfXB0KGxUo9PixlyXxDd5arf+KUAPxtjeOv96NjiBRxxht fGm8icxjiVGA6ye+vWaMIweB71Yjs+wpXO95Y+UqRPCEtztBI82AC7aJeesIOq3j3+kG 6YXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700117527; x=1700722327; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=oc5E6kIcla/Or4QU1XuvIaiW9BS0HQZyOIehNU3S8rI=; b=NIUFwskb4qyWBXevi+sxpvum7SMZB8Wi1zY71+76HftLQ0Xqmi5f1C5RuGAyN/P3Cz sZLTmx+6c/3l9KspNfQS80zdFjbGL11GRJLRWsOUH6W6ey2l2EOwa5Fm/BFhgQyOHDeX 59dIkwXVzp2iFAfEVVpl25USIarGBwjPLCFnhvQZ8O7wE21KHbnzJtuhT6ijfuHKF1+Y 6wavAAaQCBSUvt6O7fSGMH4BrTotI6GRD8tLQyaPa43en6zD22h0yqy2bsHy7K3pL3+M sbH5zl5W1H1oOeoebvS85EJgeiG14WSVYcxhbQLxWGPR0cgwX2OATPzBOeechpRv0Qyo NmsQ== X-Gm-Message-State: AOJu0YxZDMag1zTtPDg6YLqdgP8bRy9r5KDUN02QqYoHtY5+uNLSfPxl AiQtlH4bTAPGDchrqiQHpNiI2Y1lfrwfSq7DhJCOtw== X-Received: by 2002:a81:a549:0:b0:57a:cf8:5b4 with SMTP id v9-20020a81a549000000b0057a0cf805b4mr14384806ywg.51.1700117527207; Wed, 15 Nov 2023 22:52:07 -0800 (PST) MIME-Version: 1.0 References: <20231114135654.30475-1-quic_bibekkum@quicinc.com> <20231114135654.30475-3-quic_bibekkum@quicinc.com> <7edad996-f148-42d5-8e72-0334d3b9101f@quicinc.com> <61d2885a-50f9-419f-8473-10308baed493@quicinc.com> In-Reply-To: <61d2885a-50f9-419f-8473-10308baed493@quicinc.com> From: Dmitry Baryshkov Date: Thu, 16 Nov 2023 08:51:55 +0200 Message-ID: Subject: Re: [PATCH v2 2/3] iommu/arm-smmu: add ACTLR data and support for SM8550 To: Bibek Kumar Patro Cc: Konrad Dybcio , will@kernel.org, robin.murphy@arm.com, joro@8bytes.org, a39.skl@gmail.com, quic_pkondeti@quicinc.com, quic_molvera@quicinc.com, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org, qipl.kernel.upstream@quicinc.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 15 Nov 2023 22:52:20 -0800 (PST) On Thu, 16 Nov 2023 at 08:10, Bibek Kumar Patro wrote: > > > > On 11/15/2023 10:12 PM, Konrad Dybcio wrote: > > > > > > On 11/15/23 13:49, Bibek Kumar Patro wrote: > >> > >> > >> On 11/15/2023 4:15 PM, Dmitry Baryshkov wrote: > >>> On Wed, 15 Nov 2023 at 11:51, Bibek Kumar Patro > >>> wrote: > >>>> > >>>> > >>>> > >>>> On 11/15/2023 3:08 PM, Dmitry Baryshkov wrote: > >>>>> On Wed, 15 Nov 2023 at 11:22, Bibek Kumar Patro > >>>>> wrote: > >>>>>> > >>>>>> > >>>>>> > >>>>>> On 11/14/2023 7:42 PM, Dmitry Baryshkov wrote: > >>>>>>> On Tue, 14 Nov 2023 at 15:57, Bibek Kumar Patro > >>>>>>> wrote: > >>>>>>>> > >>>>>>>> Add ACTLR data table for SM8550 along with support for > >>>>>>>> same including SM8550 specific implementation operations. > >>>>>>>> > >>>>>>>> Signed-off-by: Bibek Kumar Patro > >>>>>>>> --- > >>>>>>>> drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 92 > >>>>>>>> +++++++++++++++++++++- > >>>>>>>> 1 file changed, 88 insertions(+), 4 deletions(-) > >>>>>>>> > >>>>>>>> diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c > >>>>>>>> b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c > >>>>>>>> index 578c662c7c30..0eaf6f2a2e49 100644 > >>>>>>>> --- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c > >>>>>>>> +++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c > >>>>>>>> @@ -25,6 +25,70 @@ struct actlr_data { > >>>>>>>> u32 actlr; > >>>>>>>> }; > >>>>>>>> > >>>>>>>> +#define PRE_FETCH_1 0 > >>>>>>>> +#define PRE_FETCH_2 BIT(8) > >>>>>>>> +#define PRE_FETCH_3 (BIT(9) | BIT(8)) > >>>>>>> > >>>>>>> What is the difference between PRE_FETCH_3 and PRE_FETCH_2? And > >>>>>>> PRE_FETCH_1? Are these real numbers that refer to some amount / > >>>>>>> count > >>>>>>> or just dummy names? > >>>>>>> > >>>>>> > >>>>>> No,these are not real numbers, but prefetch settings for a particular > >>>>>> perfect configuration. > >>>>> > >>>>> Then I'd ask for some better names or descriptions. > >>>>> > >>>> > >>>> Noted, PREFETCH_SETTING_n / PREFETCH_OPTION_n sounds like a better name > >>>> in the following case. Would it be okay to use this name instead? > >>> > >>> Not really. > >>> > >> > >> Any suggestion you have in mind, if not this nomenclature? > > Dmitry's concern seems to be that you provide: > > > > PRE_FETCH_1 /* prefetcher with settings preset no. 1 */ > > PRE_FETCH_2 /* prefetcher with settings preset no. 2 */ > > PRE_FETCH_3 /* prefetcher with settings preset no. 3 */ > > > > whereas it would be both useful and interesting to see what these > > settings mean, i.e. what differences there are between all of > > these presets. > > > > Ah, okay got it now from Dimitry and yours' response. > But we exactly won't be able to reveal what each of these settings > mean, as this might risk of revealing IP as ACTLR bits are > implementation defined (except CPRE and CMTLB) which other SoC vendors > might be using it in different manner(or different purpose) in their > downstream implementation. > We can name it like (e.g PREFETCH_DISABLE, PREFETCH_SHALLOW, > PREFETCH_DEEP) to indicate the behaviour, but won't be exactly > name/describe it to explain what it does with a particular setting. This is already better than 1,2,3. -- With best wishes Dmitry