* [PATCH] iommu/arm-smmu-qcom: Initialize SCTLR of the bypass context
@ 2021-01-06 0:50 ` Bjorn Andersson
0 siblings, 0 replies; 7+ messages in thread
From: Bjorn Andersson @ 2021-01-06 0:50 UTC (permalink / raw)
To: Will Deacon, Robin Murphy, Joerg Roedel
Cc: Sai Prakash Ranjan, linux-arm-kernel, iommu, linux-kernel, linux-arm-msm
On SM8150 it's occasionally observed that the boot hangs in between the
writing of SMEs and context banks in arm_smmu_device_reset().
The problem seems to coincide with a display refresh happening after
updating the stream mapping, but before clearing - and there by
disabling translation - the context bank picked to emulate translation
bypass.
Resolve this by explicitly disabling the bypass context already in
cfg_probe.
Fixes: f9081b8ff593 ("iommu/arm-smmu-qcom: Implement S2CR quirk")
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
index 5dff7ffbef11..1b83d140742f 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
@@ -196,6 +196,8 @@ static int qcom_smmu_cfg_probe(struct arm_smmu_device *smmu)
set_bit(qsmmu->bypass_cbndx, smmu->context_map);
+ arm_smmu_cb_write(smmu, qsmmu->bypass_cbndx, ARM_SMMU_CB_SCTLR, 0);
+
reg = FIELD_PREP(ARM_SMMU_CBAR_TYPE, CBAR_TYPE_S1_TRANS_S2_BYPASS);
arm_smmu_gr1_write(smmu, ARM_SMMU_GR1_CBAR(qsmmu->bypass_cbndx), reg);
}
--
2.29.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] iommu/arm-smmu-qcom: Initialize SCTLR of the bypass context
@ 2021-01-06 0:50 ` Bjorn Andersson
0 siblings, 0 replies; 7+ messages in thread
From: Bjorn Andersson @ 2021-01-06 0:50 UTC (permalink / raw)
To: Will Deacon, Robin Murphy, Joerg Roedel
Cc: linux-arm-msm, iommu, linux-arm-kernel, linux-kernel
On SM8150 it's occasionally observed that the boot hangs in between the
writing of SMEs and context banks in arm_smmu_device_reset().
The problem seems to coincide with a display refresh happening after
updating the stream mapping, but before clearing - and there by
disabling translation - the context bank picked to emulate translation
bypass.
Resolve this by explicitly disabling the bypass context already in
cfg_probe.
Fixes: f9081b8ff593 ("iommu/arm-smmu-qcom: Implement S2CR quirk")
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
index 5dff7ffbef11..1b83d140742f 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
@@ -196,6 +196,8 @@ static int qcom_smmu_cfg_probe(struct arm_smmu_device *smmu)
set_bit(qsmmu->bypass_cbndx, smmu->context_map);
+ arm_smmu_cb_write(smmu, qsmmu->bypass_cbndx, ARM_SMMU_CB_SCTLR, 0);
+
reg = FIELD_PREP(ARM_SMMU_CBAR_TYPE, CBAR_TYPE_S1_TRANS_S2_BYPASS);
arm_smmu_gr1_write(smmu, ARM_SMMU_GR1_CBAR(qsmmu->bypass_cbndx), reg);
}
--
2.29.2
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] iommu/arm-smmu-qcom: Initialize SCTLR of the bypass context
@ 2021-01-06 0:50 ` Bjorn Andersson
0 siblings, 0 replies; 7+ messages in thread
From: Bjorn Andersson @ 2021-01-06 0:50 UTC (permalink / raw)
To: Will Deacon, Robin Murphy, Joerg Roedel
Cc: linux-arm-msm, Sai Prakash Ranjan, iommu, linux-arm-kernel, linux-kernel
On SM8150 it's occasionally observed that the boot hangs in between the
writing of SMEs and context banks in arm_smmu_device_reset().
The problem seems to coincide with a display refresh happening after
updating the stream mapping, but before clearing - and there by
disabling translation - the context bank picked to emulate translation
bypass.
Resolve this by explicitly disabling the bypass context already in
cfg_probe.
Fixes: f9081b8ff593 ("iommu/arm-smmu-qcom: Implement S2CR quirk")
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
index 5dff7ffbef11..1b83d140742f 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
@@ -196,6 +196,8 @@ static int qcom_smmu_cfg_probe(struct arm_smmu_device *smmu)
set_bit(qsmmu->bypass_cbndx, smmu->context_map);
+ arm_smmu_cb_write(smmu, qsmmu->bypass_cbndx, ARM_SMMU_CB_SCTLR, 0);
+
reg = FIELD_PREP(ARM_SMMU_CBAR_TYPE, CBAR_TYPE_S1_TRANS_S2_BYPASS);
arm_smmu_gr1_write(smmu, ARM_SMMU_GR1_CBAR(qsmmu->bypass_cbndx), reg);
}
--
2.29.2
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] iommu/arm-smmu-qcom: Initialize SCTLR of the bypass context
2021-01-06 0:50 ` Bjorn Andersson
(?)
@ 2021-01-07 14:22 ` Will Deacon
-1 siblings, 0 replies; 7+ messages in thread
From: Will Deacon @ 2021-01-07 14:22 UTC (permalink / raw)
To: Joerg Roedel, Bjorn Andersson, Robin Murphy
Cc: catalin.marinas, kernel-team, Will Deacon, Sai Prakash Ranjan,
linux-kernel, linux-arm-kernel, linux-arm-msm, iommu
On Tue, 5 Jan 2021 16:50:38 -0800, Bjorn Andersson wrote:
> On SM8150 it's occasionally observed that the boot hangs in between the
> writing of SMEs and context banks in arm_smmu_device_reset().
>
> The problem seems to coincide with a display refresh happening after
> updating the stream mapping, but before clearing - and there by
> disabling translation - the context bank picked to emulate translation
> bypass.
>
> [...]
Applied to arm64 (for-next/iommu/fixes), thanks!
[1/1] iommu/arm-smmu-qcom: Initialize SCTLR of the bypass context
https://git.kernel.org/arm64/c/aded8c7c2b72
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] iommu/arm-smmu-qcom: Initialize SCTLR of the bypass context
@ 2021-01-07 14:22 ` Will Deacon
0 siblings, 0 replies; 7+ messages in thread
From: Will Deacon @ 2021-01-07 14:22 UTC (permalink / raw)
To: Joerg Roedel, Bjorn Andersson, Robin Murphy
Cc: Will Deacon, catalin.marinas, linux-kernel, iommu, linux-arm-msm,
kernel-team, linux-arm-kernel
On Tue, 5 Jan 2021 16:50:38 -0800, Bjorn Andersson wrote:
> On SM8150 it's occasionally observed that the boot hangs in between the
> writing of SMEs and context banks in arm_smmu_device_reset().
>
> The problem seems to coincide with a display refresh happening after
> updating the stream mapping, but before clearing - and there by
> disabling translation - the context bank picked to emulate translation
> bypass.
>
> [...]
Applied to arm64 (for-next/iommu/fixes), thanks!
[1/1] iommu/arm-smmu-qcom: Initialize SCTLR of the bypass context
https://git.kernel.org/arm64/c/aded8c7c2b72
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] iommu/arm-smmu-qcom: Initialize SCTLR of the bypass context
@ 2021-01-07 14:22 ` Will Deacon
0 siblings, 0 replies; 7+ messages in thread
From: Will Deacon @ 2021-01-07 14:22 UTC (permalink / raw)
To: Joerg Roedel, Bjorn Andersson, Robin Murphy
Cc: Sai Prakash Ranjan, Will Deacon, catalin.marinas, linux-kernel,
iommu, linux-arm-msm, kernel-team, linux-arm-kernel
On Tue, 5 Jan 2021 16:50:38 -0800, Bjorn Andersson wrote:
> On SM8150 it's occasionally observed that the boot hangs in between the
> writing of SMEs and context banks in arm_smmu_device_reset().
>
> The problem seems to coincide with a display refresh happening after
> updating the stream mapping, but before clearing - and there by
> disabling translation - the context bank picked to emulate translation
> bypass.
>
> [...]
Applied to arm64 (for-next/iommu/fixes), thanks!
[1/1] iommu/arm-smmu-qcom: Initialize SCTLR of the bypass context
https://git.kernel.org/arm64/c/aded8c7c2b72
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] iommu/arm-smmu-qcom: Initialize SCTLR of the bypass context
2021-01-06 0:50 ` Bjorn Andersson
` (2 preceding siblings ...)
(?)
@ 2021-03-01 19:59 ` patchwork-bot+linux-arm-msm
-1 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+linux-arm-msm @ 2021-03-01 19:59 UTC (permalink / raw)
To: Bjorn Andersson; +Cc: linux-arm-msm
Hello:
This patch was applied to qcom/linux.git (refs/heads/for-next):
On Tue, 5 Jan 2021 16:50:38 -0800 you wrote:
> On SM8150 it's occasionally observed that the boot hangs in between the
> writing of SMEs and context banks in arm_smmu_device_reset().
>
> The problem seems to coincide with a display refresh happening after
> updating the stream mapping, but before clearing - and there by
> disabling translation - the context bank picked to emulate translation
> bypass.
>
> [...]
Here is the summary with links:
- iommu/arm-smmu-qcom: Initialize SCTLR of the bypass context
https://git.kernel.org/qcom/c/aded8c7c2b72
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-03-01 20:51 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-06 0:50 [PATCH] iommu/arm-smmu-qcom: Initialize SCTLR of the bypass context Bjorn Andersson
2021-01-06 0:50 ` Bjorn Andersson
2021-01-06 0:50 ` Bjorn Andersson
2021-01-07 14:22 ` Will Deacon
2021-01-07 14:22 ` Will Deacon
2021-01-07 14:22 ` Will Deacon
2021-03-01 19:59 ` patchwork-bot+linux-arm-msm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.