From: Bibek Kumar Patro <quic_bibekkum@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: <will@kernel.org>, <robin.murphy@arm.com>, <joro@8bytes.org>,
<a39.skl@gmail.com>, <konrad.dybcio@linaro.org>,
<quic_saipraka@quicinc.com>, <quic_pkondeti@quicinc.com>,
<quic_molvera@quicinc.com>,
<linux-arm-kernel@lists.infradead.org>, <iommu@lists.linux.dev>,
<linux-kernel@vger.kernel.org>,
<qipl.kernel.upstream@quicinc.com>
Subject: Re: [PATCH 3/3] iommu/arm-smmu: re-enable context caching in smmu reset operation
Date: Sat, 4 Nov 2023 03:36:42 +0530 [thread overview]
Message-ID: <981deaf3-c7e2-4bbc-86b8-2151bf0b6e00@quicinc.com> (raw)
In-Reply-To: <CAA8EJpob0DoXd_UTEiJf8z3JncaWk_1rgit6c4dqQ0gB6JDFxQ@mail.gmail.com>
On 11/4/2023 3:28 AM, Dmitry Baryshkov wrote:
> On Fri, 3 Nov 2023 at 23:53, Bibek Kumar Patro
> <quic_bibekkum@quicinc.com> wrote:
>>
>> Context caching is re-enabled in the prefetch buffer for Qualcomm SoCs
>> through SoC specific reset ops, which is disabled in the default MMU-500
>> reset ops, but is expected for context banks using ACTLR register to
>> retain the prefetch value during reset and runtime suspend.
>>
>> Signed-off-by: Bibek Kumar Patro <quic_bibekkum@quicinc.com>
>> ---
>> drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 26 ++++++++++++++++++----
>> 1 file changed, 22 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 590b7c285299..f342b4778cf1 100644
>> --- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
>> +++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
>> @@ -457,11 +457,29 @@ static int qcom_smmu_def_domain_type(struct device *dev)
>> return match ? IOMMU_DOMAIN_IDENTITY : 0;
>> }
>>
>> +#define ARM_MMU500_ACTLR_CPRE BIT(1)
>> +
>> +static int qcom_smmu500_reset(struct arm_smmu_device *smmu)
>> +{
>> + int i;
>> + u32 reg;
>> +
>> + arm_mmu500_reset(smmu);
>> +
>> + for (i = 0; i < smmu->num_context_banks; ++i) {
>> + reg = arm_smmu_cb_read(smmu, i, ARM_SMMU_CB_ACTLR);
>> + reg |= ARM_MMU500_ACTLR_CPRE;
>> + arm_smmu_cb_write(smmu, i, ARM_SMMU_CB_ACTLR, reg);
>> + }
>
> Wrong indentation. Did you run your patches through checkpatch.pl?
>
Yes Dmitry, I did run checkpatch.pl script on this patch as well as
others, got 0 errors and 0 warnings. With -f option as well. Did not
get any related errors and warnings.
>> +
>> + return 0;
>> +}
>> +
>> static int qcom_sdm845_smmu500_reset(struct arm_smmu_device *smmu)
>> {
>> int ret;
>>
>> - arm_mmu500_reset(smmu);
>> + qcom_smmu500_reset(smmu);
>>
>> /*
>> * To address performance degradation in non-real time clients,
>> @@ -488,7 +506,7 @@ static const struct arm_smmu_impl qcom_smmu_500_impl = {
>> .init_context = qcom_smmu_init_context,
>> .cfg_probe = qcom_smmu_cfg_probe,
>> .def_domain_type = qcom_smmu_def_domain_type,
>> - .reset = arm_mmu500_reset,
>> + .reset = qcom_smmu500_reset,
>> .write_s2cr = qcom_smmu_write_s2cr,
>> .tlb_sync = qcom_smmu_tlb_sync,
>> };
>> @@ -507,7 +525,7 @@ static const struct arm_smmu_impl sm8550_smmu_500_impl = {
>> .init_context = qcom_smmu_init_context,
>> .cfg_probe = qcom_smmu_cfg_probe,
>> .def_domain_type = qcom_smmu_def_domain_type,
>> - .reset = arm_mmu500_reset,
>> + .reset = qcom_smmu500_reset,
>> .write_s2cr = qcom_smmu_write_s2cr,
>> .tlb_sync = qcom_smmu_tlb_sync,
>> };
>> @@ -523,7 +541,7 @@ static const struct arm_smmu_impl qcom_adreno_smmu_v2_impl = {
>> static const struct arm_smmu_impl qcom_adreno_smmu_500_impl = {
>> .init_context = qcom_adreno_smmu_init_context,
>> .def_domain_type = qcom_smmu_def_domain_type,
>> - .reset = arm_mmu500_reset,
>> + .reset = qcom_smmu500_reset,
>> .alloc_context_bank = qcom_adreno_smmu_alloc_context_bank,
>> .write_sctlr = qcom_adreno_smmu_write_sctlr,
>> .tlb_sync = qcom_smmu_tlb_sync,
>> --
>> 2.17.1
>>
>
>
next prev parent reply other threads:[~2023-11-03 22:07 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-03 21:51 [PATCH 0/3] iommu/arm-smmu: introduction of ACTLR implementation for Qualcomm SoCs Bibek Kumar Patro
2023-11-03 21:51 ` [PATCH 1/3] iommu/arm-smmu: introduction of ACTLR for custom prefetcher settings Bibek Kumar Patro
2023-11-03 22:03 ` Dmitry Baryshkov
2023-11-06 6:12 ` Bibek Kumar Patro
2023-11-14 10:20 ` Bibek Kumar Patro
2023-11-14 10:36 ` Dmitry Baryshkov
2023-11-03 21:51 ` [PATCH 2/3] iommu/arm-smmu: add ACTLR data and support for SM8550 Bibek Kumar Patro
2023-11-03 22:01 ` Dmitry Baryshkov
2023-11-03 22:38 ` Bibek Kumar Patro
2023-11-03 22:41 ` Dmitry Baryshkov
2023-11-06 6:09 ` Bibek Kumar Patro
2023-11-06 9:05 ` Dmitry Baryshkov
2023-11-06 12:09 ` Bibek Kumar Patro
2023-11-10 9:55 ` Pratyush Brahma
2023-11-04 11:29 ` Konrad Dybcio
2023-11-06 6:26 ` Bibek Kumar Patro
2023-11-04 15:29 ` kernel test robot
2023-11-03 21:51 ` [PATCH 3/3] iommu/arm-smmu: re-enable context caching in smmu reset operation Bibek Kumar Patro
2023-11-03 21:58 ` Dmitry Baryshkov
2023-11-03 22:06 ` Bibek Kumar Patro [this message]
2023-11-03 22:23 ` Dmitry Baryshkov
2023-11-03 22:42 ` Bibek Kumar Patro
2023-11-04 11:30 ` Konrad Dybcio
2023-11-06 6:28 ` Bibek Kumar Patro
2023-11-03 22:44 ` [PATCH 0/3] iommu/arm-smmu: introduction of ACTLR implementation for Qualcomm SoCs Dmitry Baryshkov
2023-11-06 6:39 ` 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=981deaf3-c7e2-4bbc-86b8-2151bf0b6e00@quicinc.com \
--to=quic_bibekkum@quicinc.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-kernel@vger.kernel.org \
--cc=qipl.kernel.upstream@quicinc.com \
--cc=quic_molvera@quicinc.com \
--cc=quic_pkondeti@quicinc.com \
--cc=quic_saipraka@quicinc.com \
--cc=robin.murphy@arm.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