* [PATCH] iommu/arm-smmu-v3: Warn about missing IRQs
@ 2017-10-27 13:08 Robin Murphy
[not found] ` <f03a7c9f0be2f0af461b61d18fff3c931da77ebb.1509109598.git.robin.murphy-5wv7dgnIgG8@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Robin Murphy @ 2017-10-27 13:08 UTC (permalink / raw)
To: will.deacon-5wv7dgnIgG8
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
It is annoyingly non-obvious when DMA transactions silently go missing
due to undetected SMMU faults. Help skip the first few debugging steps
in those situations by making it clear when we have neither wired IRQs
nor MSIs with which to raise error conditions.
Signed-off-by: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
---
drivers/iommu/arm-smmu-v3.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
index e67ba6c40faf..1a374c5c9507 100644
--- a/drivers/iommu/arm-smmu-v3.c
+++ b/drivers/iommu/arm-smmu-v3.c
@@ -2263,6 +2263,8 @@ static void arm_smmu_setup_unique_irqs(struct arm_smmu_device *smmu)
"arm-smmu-v3-evtq", smmu);
if (ret < 0)
dev_warn(smmu->dev, "failed to enable evtq irq\n");
+ } else {
+ dev_warn(smmu->dev, "no evtq irq - events will not be reported!\n");
}
irq = smmu->cmdq.q.irq;
@@ -2280,6 +2282,8 @@ static void arm_smmu_setup_unique_irqs(struct arm_smmu_device *smmu)
0, "arm-smmu-v3-gerror", smmu);
if (ret < 0)
dev_warn(smmu->dev, "failed to enable gerror irq\n");
+ } else {
+ dev_warn(smmu->dev, "no gerr irq - errors will not be reported!\n");
}
if (smmu->features & ARM_SMMU_FEAT_PRI) {
--
2.13.4.dirty
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iommu/arm-smmu-v3: Warn about missing IRQs
[not found] ` <f03a7c9f0be2f0af461b61d18fff3c931da77ebb.1509109598.git.robin.murphy-5wv7dgnIgG8@public.gmane.org>
@ 2017-10-27 16:52 ` Will Deacon
0 siblings, 0 replies; 2+ messages in thread
From: Will Deacon @ 2017-10-27 16:52 UTC (permalink / raw)
To: Robin Murphy
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
On Fri, Oct 27, 2017 at 02:08:16PM +0100, Robin Murphy wrote:
> It is annoyingly non-obvious when DMA transactions silently go missing
> due to undetected SMMU faults. Help skip the first few debugging steps
> in those situations by making it clear when we have neither wired IRQs
> nor MSIs with which to raise error conditions.
>
> Signed-off-by: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
> ---
> drivers/iommu/arm-smmu-v3.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
> index e67ba6c40faf..1a374c5c9507 100644
> --- a/drivers/iommu/arm-smmu-v3.c
> +++ b/drivers/iommu/arm-smmu-v3.c
> @@ -2263,6 +2263,8 @@ static void arm_smmu_setup_unique_irqs(struct arm_smmu_device *smmu)
> "arm-smmu-v3-evtq", smmu);
> if (ret < 0)
> dev_warn(smmu->dev, "failed to enable evtq irq\n");
> + } else {
> + dev_warn(smmu->dev, "no evtq irq - events will not be reported!\n");
> }
>
> irq = smmu->cmdq.q.irq;
> @@ -2280,6 +2282,8 @@ static void arm_smmu_setup_unique_irqs(struct arm_smmu_device *smmu)
> 0, "arm-smmu-v3-gerror", smmu);
> if (ret < 0)
> dev_warn(smmu->dev, "failed to enable gerror irq\n");
> + } else {
> + dev_warn(smmu->dev, "no gerr irq - errors will not be reported!\n");
> }
>
> if (smmu->features & ARM_SMMU_FEAT_PRI) {
Can we also print something similar for the PRIQ when we detect that PRI is
supported, please? Whilst I agree that event and gerror are the critical
ones, I'm not sure how a PCIe device behaves if its PRI requests are
ignored, but this might help to debug it.
Will
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-27 16:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-27 13:08 [PATCH] iommu/arm-smmu-v3: Warn about missing IRQs Robin Murphy
[not found] ` <f03a7c9f0be2f0af461b61d18fff3c931da77ebb.1509109598.git.robin.murphy-5wv7dgnIgG8@public.gmane.org>
2017-10-27 16:52 ` Will Deacon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).