diff mbox series

[PATCHv3,4/6] iommu/arm-smmu-qcom: Request direct mapping for modem device

Message ID 509d88fbe7592aa15f867933c177b61bc7ba8efa.1587400573.git.saiprakash.ranjan@codeaurora.org (mailing list archive)
State New, archived
Headers show
Series iommu/arm-smmu: Allow client devices to select identity mapping | expand

Commit Message

Sai Prakash Ranjan April 20, 2020, 4:42 p.m. UTC
From: Sibi Sankar <sibis@codeaurora.org>

Request direct mapping for modem on platforms which don't have TrustZone
(which programs the modem SIDs) to prevent the following global faults seen
on Cheza/Trogdor:

arm-smmu 15000000.iommu: Unexpected global fault, this could be serious
arm-smmu 15000000.iommu: GFSR 0x80000002, GFSYNR0 0x00000000,
			 GFSYNR1 0x00000781, GFSYNR2 0x00000000

arm-smmu 15000000.iommu: Unexpected global fault, this could be serious
arm-smmu 15000000.iommu: GFSR 0x80000002, GFSYNR0 0x00000000,
			 GFSYNR1 0x00000461, GFSYNR2 0x00000000

Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
---
 drivers/iommu/arm-smmu-qcom.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Robin Murphy April 20, 2020, 5:09 p.m. UTC | #1
On 2020-04-20 5:42 pm, Sai Prakash Ranjan wrote:
> From: Sibi Sankar <sibis@codeaurora.org>
> 
> Request direct mapping for modem on platforms which don't have TrustZone
> (which programs the modem SIDs) to prevent the following global faults seen
> on Cheza/Trogdor:

Not strictly true - it's patch #6/6 that prevents *those* faults (and 
these days the driver should be reporting unmatched streams a little 
more helpfully). This change would resolve the context faults and/or 
weird memory corruption that might result from applying patch #6 alone - 
this is the crazy thing where transactions sometimes go directly to DRAM 
round the side of the SMMU so we can never safely remap anything, right?

Robin.

> arm-smmu 15000000.iommu: Unexpected global fault, this could be serious
> arm-smmu 15000000.iommu: GFSR 0x80000002, GFSYNR0 0x00000000,
> 			 GFSYNR1 0x00000781, GFSYNR2 0x00000000
> 
> arm-smmu 15000000.iommu: Unexpected global fault, this could be serious
> arm-smmu 15000000.iommu: GFSR 0x80000002, GFSYNR0 0x00000000,
> 			 GFSYNR1 0x00000461, GFSYNR2 0x00000000
> 
> Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
> Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
> ---
>   drivers/iommu/arm-smmu-qcom.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/iommu/arm-smmu-qcom.c b/drivers/iommu/arm-smmu-qcom.c
> index 5bedf21587a5..cf01d0215a39 100644
> --- a/drivers/iommu/arm-smmu-qcom.c
> +++ b/drivers/iommu/arm-smmu-qcom.c
> @@ -17,7 +17,9 @@ static const struct of_device_id qcom_smmu_client_of_match[] = {
>   	{ .compatible = "qcom,mdp4" },
>   	{ .compatible = "qcom,mdss" },
>   	{ .compatible = "qcom,sc7180-mdss" },
> +	{ .compatible = "qcom,sc7180-mss-pil" },
>   	{ .compatible = "qcom,sdm845-mdss" },
> +	{ .compatible = "qcom,sdm845-mss-pil" },
>   	{ }
>   };
>   
>
Sai Prakash Ranjan April 20, 2020, 6:10 p.m. UTC | #2
Hi Robin,

On 2020-04-20 22:39, Robin Murphy wrote:
> On 2020-04-20 5:42 pm, Sai Prakash Ranjan wrote:
>> From: Sibi Sankar <sibis@codeaurora.org>
>> 
>> Request direct mapping for modem on platforms which don't have 
>> TrustZone
>> (which programs the modem SIDs) to prevent the following global faults 
>> seen
>> on Cheza/Trogdor:
> 
> Not strictly true - it's patch #6/6 that prevents *those* faults (and
> these days the driver should be reporting unmatched streams a little
> more helpfully). This change would resolve the context faults and/or
> weird memory corruption that might result from applying patch #6 alone
> - this is the crazy thing where transactions sometimes go directly to
> DRAM round the side of the SMMU so we can never safely remap anything,
> right?
> 

True this doesnt prevent global faults, the fault details should go to 
patch6.
I'll update the commit msg something like below:

The Q6 modem sub-system has direct access to DDR through memnoc.
Also SMMU is not expected to provide access control/translation for 
these SIDs
(sandboxing of the modem is achieved through XPUs engaged using SMC 
calls).

Thanks,
Sai
diff mbox series

Patch

diff --git a/drivers/iommu/arm-smmu-qcom.c b/drivers/iommu/arm-smmu-qcom.c
index 5bedf21587a5..cf01d0215a39 100644
--- a/drivers/iommu/arm-smmu-qcom.c
+++ b/drivers/iommu/arm-smmu-qcom.c
@@ -17,7 +17,9 @@  static const struct of_device_id qcom_smmu_client_of_match[] = {
 	{ .compatible = "qcom,mdp4" },
 	{ .compatible = "qcom,mdss" },
 	{ .compatible = "qcom,sc7180-mdss" },
+	{ .compatible = "qcom,sc7180-mss-pil" },
 	{ .compatible = "qcom,sdm845-mdss" },
+	{ .compatible = "qcom,sdm845-mss-pil" },
 	{ }
 };