Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: Bibek Kumar Patro <quic_bibekkum@quicinc.com>
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	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,
	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 v13 4/6] iommu/arm-smmu: add ACTLR data and support for SM8550
Date: Wed, 3 Jul 2024 14:02:10 +0100	[thread overview]
Message-ID: <20240703130209.GA5750@willie-the-truck> (raw)
In-Reply-To: <6da77880-2ba4-4b02-8b3e-cb0fbd0a9daf@quicinc.com>

On Wed, Jul 03, 2024 at 05:45:23PM +0530, Bibek Kumar Patro wrote:
> 
> 
> On 7/2/2024 12:04 AM, Dmitry Baryshkov wrote:
> > On Fri, Jun 28, 2024 at 07:34:33PM GMT, 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 <quic_bibekkum@quicinc.com>
> > > ---
> > >   drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 89 ++++++++++++++++++++++
> > >   1 file changed, 89 insertions(+)
> > > 
> > > diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
> > > index 77c9abffe07d..b4521471ffe9 100644
> > > --- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
> > > +++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
> > > @@ -23,6 +23,85 @@
> > > 
> > >   #define CPRE			(1 << 1)
> > >   #define CMTLB			(1 << 0)
> > > +#define PREFETCH_SHIFT		8
> > > +#define PREFETCH_DEFAULT	0
> > > +#define PREFETCH_SHALLOW	(1 << PREFETCH_SHIFT)
> > > +#define PREFETCH_MODERATE	(2 << PREFETCH_SHIFT)
> > > +#define PREFETCH_DEEP		(3 << PREFETCH_SHIFT)
> > > +
> > > +static const struct actlr_config sm8550_apps_actlr_cfg[] = {
> > > +	{ 0x18a0, 0x0000, PREFETCH_SHALLOW | CPRE | CMTLB },
> > > +	{ 0x18e0, 0x0000, PREFETCH_SHALLOW | CPRE | CMTLB },
> > > +	{ 0x0800, 0x0020, PREFETCH_DEFAULT | CMTLB },
> > > +	{ 0x1800, 0x00c0, PREFETCH_DEFAULT | CMTLB },
> > > +	{ 0x1820, 0x0000, PREFETCH_DEFAULT | CMTLB },
> > > +	{ 0x1860, 0x0000, PREFETCH_DEFAULT | CMTLB },
> > > +	{ 0x0c01, 0x0020, PREFETCH_DEEP | CPRE | CMTLB },
> > 
> > - Please keep the list sorted
> 
> Sure Dmitry, will sort this list in reverse-christmas-tree order
> in next iteration. Thanks for this input.
> 
> > - Please comment, which devices use these settings.
> 
> As discussed in earlier versions of this patch, these table entries
> are kind of just blind values for SMMU device, where SMMU do not have
> idea on which SID belong to which client. During probe time when the
> clients' Stream-ID has corresponding ACTLR entry then the driver would
> set value in register.

I'm still firmly of the opinion that this stuff needs a higher-level
description in the device-tree and should not be hard-coded in the driver
like this. It's not just a list of opaque values; it describes
SoC-specific topological information that should not be this rigid.

Will


  reply	other threads:[~2024-07-03 13:03 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-28 14:04 [PATCH v13 0/6] iommu/arm-smmu: introduction of ACTLR implementation for Qualcomm SoCs Bibek Kumar Patro
2024-06-28 14:04 ` [PATCH v13 1/6] iommu/arm-smmu: re-enable context caching in smmu reset operation Bibek Kumar Patro
2024-06-28 14:04 ` [PATCH v13 2/6] iommu/arm-smmu: refactor qcom_smmu structure to include single pointer Bibek Kumar Patro
2024-06-28 14:04 ` [PATCH v13 3/6] iommu/arm-smmu: introduction of ACTLR for custom prefetcher settings Bibek Kumar Patro
2024-06-28 14:04 ` [PATCH v13 4/6] iommu/arm-smmu: add ACTLR data and support for SM8550 Bibek Kumar Patro
2024-07-01 18:34   ` Dmitry Baryshkov
2024-07-03 12:15     ` Bibek Kumar Patro
2024-07-03 13:02       ` Will Deacon [this message]
2024-07-04  9:12         ` Bibek Kumar Patro
2024-07-04 11:26           ` Dmitry Baryshkov
2024-07-04 11:23       ` Dmitry Baryshkov
2024-07-10 17:44         ` Bibek Kumar Patro
2024-06-28 14:04 ` [PATCH v13 5/6] iommu/arm-smmu: add ACTLR data and support for SC7280 Bibek Kumar Patro
2024-06-28 14:04 ` [PATCH v13 6/6] iommu/arm-smmu: add support for PRR bit setup Bibek Kumar Patro
2024-06-28 14:17   ` Rob Clark
2024-06-28 15:09     ` Bibek Kumar Patro
2024-06-28 15:44       ` Rob Clark
2024-07-01 11:00         ` Bibek Kumar Patro
2024-07-01 20:31           ` Rob Clark
2024-07-03 11:38             ` Bibek Kumar Patro
2024-07-04 14:46               ` Rob Clark
2024-07-04 15:58                 ` Rob Clark
2024-07-09 19:42                   ` Bibek Kumar Patro
2024-07-10 17:01                     ` Rob Clark
2024-07-10 22:01                       ` Konrad Dybcio
2024-07-15 11:01                         ` Bibek Kumar Patro
2024-07-15 10:59                       ` Bibek Kumar Patro
2024-07-15 20:07                         ` Rob Clark
2024-07-16 12:14                           ` Konrad Dybcio
2024-07-19 12:59                             ` Bibek Kumar Patro
2024-07-17 10:27                           ` Bibek Kumar Patro
2024-07-17 15:00                             ` Rob Clark
2024-07-19 12:38                               ` Bibek Kumar Patro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240703130209.GA5750@willie-the-truck \
    --to=will@kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@ziepe.ca \
    --cc=joro@8bytes.org \
    --cc=jsnitsel@redhat.com \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_bibekkum@quicinc.com \
    --cc=quic_c_gdjako@quicinc.com \
    --cc=robdclark@gmail.com \
    --cc=robh@kernel.org \
    --cc=robin.murphy@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox