public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: Bibek Kumar Patro <quic_bibekkum@quicinc.com>,
	will@kernel.org, joro@8bytes.org, dmitry.baryshkov@linaro.org,
	a39.skl@gmail.com, konrad.dybcio@linaro.org,
	quic_pkondeti@quicinc.com, quic_molvera@quicinc.com
Cc: 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
Subject: Re: [PATCH v2 1/3] iommu/arm-smmu: introduction of ACTLR for custom prefetcher settings
Date: Wed, 15 Nov 2023 14:53:04 +0000	[thread overview]
Message-ID: <c75d107a-44cb-4df3-b583-13719df1f8be@arm.com> (raw)
In-Reply-To: <40282b6e-9524-4a88-97ca-3ce890317279@quicinc.com>

On 2023-11-15 1:54 pm, Bibek Kumar Patro wrote:
> 
>>> @@ -467,6 +505,9 @@ static struct arm_smmu_device 
>>> *qcom_smmu_create(struct arm_smmu_device *smmu,
>>>       qsmmu->smmu.impl = impl;
>>>       qsmmu->cfg = data->cfg;
>>>
>>> +    if (data->actlrcfg && (data->actlrcfg->size))
>>> +        qsmmu->actlrcfg = data->actlrcfg;
>>
>> Do we really need to replicate multiple parts of the data, or would it 
>> be sensible to just replace qsmmu->cfg with qsmmu->data and handle the 
>> further dereferences in the places that want them?
>>
> 
> Mm, could not understand this properly. :( Could you help explain more 
> please?
> As per my understanding aren't data and qsmmu different structures.
> qcom_smmu is a superset of arm_smmu housing additonal properties
> and qcom_smmu_match_data is kind of a superset of arm_smmu_impl with
> additional specific implmentations, so both needs to be in place?
> Apologies if I understood your statement incorrectly.

My point is that the data is static and constant, so there's really no 
point storing multiple pointers into different bits of it. So rather than:

	qsmmu->cfg = data->cfg;
	qssmu->actlrcfg = data->actlrcfg;
	...
	do_something(qsmmu->cfg);
	...
	do_other_thing(qsmmu->actlrcfg);

we can just store the one pointer and have:

	qsmmu->data = data;
	...
	do_something(qsmmu->data->cfg);
	...
	do_other_thing(qsmmu->data->actlrcfg);

Thanks,
Robin.

>>> +
>>>       return &qsmmu->smmu;
>>>   }
>>>
>>> diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.h 
>>> b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.h
>>> index 593910567b88..4b6862715070 100644
>>> --- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.h
>>> +++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.h
>>> @@ -9,6 +9,7 @@
>>>   struct qcom_smmu {
>>>       struct arm_smmu_device smmu;
>>>       const struct qcom_smmu_config *cfg;
>>> +    const struct actlr_config *actlrcfg;
>>>       bool bypass_quirk;
>>>       u8 bypass_cbndx;
>>>       u32 stall_enabled;
>>> @@ -25,6 +26,7 @@ struct qcom_smmu_config {
>>>   };
>>>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-11-15 14:53 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-14 13:56 [PATCH v2 0/3] iommu/arm-smmu: introduction of ACTLR implementation for Qualcomm SoCs Bibek Kumar Patro
2023-11-14 13:56 ` [PATCH v2 1/3] iommu/arm-smmu: introduction of ACTLR for custom prefetcher settings Bibek Kumar Patro
2023-11-14 14:08   ` Dmitry Baryshkov
2023-11-15  5:42     ` Bibek Kumar Patro
2023-11-14 16:55   ` Robin Murphy
2023-11-15 12:32     ` Bibek Kumar Patro
2023-11-15 15:04       ` Robin Murphy
2023-11-20 10:24         ` Bibek Kumar Patro
2023-11-15 13:54     ` Bibek Kumar Patro
2023-11-15 14:53       ` Robin Murphy [this message]
2023-11-17  5:27         ` Bibek Kumar Patro
2023-11-14 13:56 ` [PATCH v2 2/3] iommu/arm-smmu: add ACTLR data and support for SM8550 Bibek Kumar Patro
2023-11-14 14:12   ` Dmitry Baryshkov
2023-11-15  9:22     ` Bibek Kumar Patro
2023-11-15  9:38       ` Dmitry Baryshkov
2023-11-15  9:51         ` Bibek Kumar Patro
2023-11-15 10:45           ` Dmitry Baryshkov
2023-11-15 12:49             ` Bibek Kumar Patro
2023-11-15 13:10               ` Dmitry Baryshkov
2023-11-15 16:42               ` Konrad Dybcio
2023-11-16  6:09                 ` Bibek Kumar Patro
2023-11-16  6:51                   ` Dmitry Baryshkov
2023-11-17  5:36                     ` Bibek Kumar Patro
2023-11-14 13:56 ` [PATCH v2 3/3] iommu/arm-smmu: re-enable context caching in smmu reset operation Bibek Kumar Patro
2023-11-14 14:15   ` Dmitry Baryshkov
2023-11-15  9:45     ` Bibek Kumar Patro
2023-11-15 11:03       ` Dmitry Baryshkov
2023-11-16 12:44         ` Bibek Kumar Patro
2023-11-16 15:24           ` Dmitry Baryshkov
2023-11-16 17:04             ` Robin Murphy
2023-11-17  9:10               ` Bibek Kumar Patro
2023-11-15 16:43   ` Konrad Dybcio
2023-11-17  7:15     ` Bibek Kumar Patro
2023-11-14 14:06 ` [PATCH v2 0/3] iommu/arm-smmu: introduction of ACTLR implementation for Qualcomm SoCs Dmitry Baryshkov

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=c75d107a-44cb-4df3-b583-13719df1f8be@arm.com \
    --to=robin.murphy@arm.com \
    --cc=a39.skl@gmail.com \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=qipl.kernel.upstream@quicinc.com \
    --cc=quic_bibekkum@quicinc.com \
    --cc=quic_molvera@quicinc.com \
    --cc=quic_pkondeti@quicinc.com \
    --cc=will@kernel.org \
    /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