[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <26af3ecc-8b3f-4b10-b594-eae57de501cb@linaro.org>
Date: Sat, 4 Nov 2023 12:30:54 +0100
From: Konrad Dybcio <konrad.dybcio@...aro.org>
To: Bibek Kumar Patro <quic_bibekkum@...cinc.com>, will@...nel.org,
robin.murphy@....com, joro@...tes.org, dmitry.baryshkov@...aro.org,
a39.skl@...il.com, quic_saipraka@...cinc.com,
quic_pkondeti@...cinc.com, quic_molvera@...cinc.com
Cc: linux-arm-kernel@...ts.infradead.org, iommu@...ts.linux.dev,
linux-kernel@...r.kernel.org, qipl.kernel.upstream@...cinc.com
Subject: Re: [PATCH 3/3] iommu/arm-smmu: re-enable context caching in smmu
reset operation
On 11/3/23 22:51, Bibek Kumar Patro 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@...cinc.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) {
This loop deserves a comment above it like
/* Re-enable context caching after reset */
Konrad
Powered by blists - more mailing lists