Skip to contentSkip to conversation

iommu/arm-smmu-v3: suppress MSI allocation failure message

PATCH In review Nate Watterson 4 participants 4 messages Jan 17, 2018 IOMMU

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu/arm-smmu-v3: suppress MSI allocation failure message

From: Sinan Kaya <[email protected]>

Even though QDF2400 supports MSI interrupts with SMMUv3, it is not enabled in ACPI FW to preserve compatibility with older kernel versions. Code is emitting warning message during boot.

This is causing some test tools to record a false warning and is causing support issues.

Better reduce the message level.

---
 drivers/iommu/arm-smmu-v3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/arm-smmu-v3.c +1 -1
index 744592d..2118fda 100644
@@ -2331,7 +2331,7 @@ static void arm_smmu_setup_msis(struct arm_smmu_device *smmu)
 	/* Allocate MSIs for evtq, gerror and priq. Ignore cmdq */
 	ret = platform_msi_domain_alloc_irqs(dev, nvec, arm_smmu_write_msi_msg);
 	if (ret) {
-		dev_warn(dev, "failed to allocate MSIs\n");
+		dev_info(dev, "failed to allocate MSIs\n");
 		return;
 	}
 
Signature · 3 lines
Qualcomm Datacenter Technologies, Inc. on behalf of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux
Foundation Collaborative Project.
reviewer
#1 lore raw

[ +Marc just in case ]

Quoted 10 lines · Nate Watterson

From: Sinan Kaya <[email protected]>

Even though QDF2400 supports MSI interrupts with SMMUv3, it is not enabled in ACPI FW to preserve compatibility with older kernel versions. Code is emitting warning message during boot.

This is causing some test tools to record a false warning and is causing support issues.

Better reduce the message level.

Ugh, that's unfortunate, since there are also plenty of genuine error conditions encapsulated in there which we *would* want to report as such (but still then fall back to wired IRQs if possible). Is the return value sufficient to differentiate the "there is no MSI parent" and "there are MSIs but something went wrong" cases, or is it more complicated than that?

Robin.

Quoted 20 lines
---
  drivers/iommu/arm-smmu-v3.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/arm-smmu-v3.c +1 -1
index 744592d..2118fda 100644
@@ -2331,7 +2331,7 @@ static void arm_smmu_setup_msis(struct arm_smmu_device *smmu)
  	/* Allocate MSIs for evtq, gerror and priq. Ignore cmdq */
  	ret = platform_msi_domain_alloc_irqs(dev, nvec, arm_smmu_write_msi_msg);
  	if (ret) {
-		dev_warn(dev, "failed to allocate MSIs\n");
+		dev_info(dev, "failed to allocate MSIs\n");
  		return;
  	}
 
#2 lore raw
Quoted 12 lines · Robin Murphy

[ +Marc just in case ]

Quoted 9 lines · Nate Watterson

From: Sinan Kaya <[email protected]>

Even though QDF2400 supports MSI interrupts with SMMUv3, it is not enabled in ACPI FW to preserve compatibility with older kernel versions. Code is emitting warning message during boot.

This is causing some test tools to record a false warning and is causing support issues.

Quoted 8 lines
Quoted 1 line

Better reduce the message level.

Ugh, that's unfortunate, since there are also plenty of genuine error conditions encapsulated in there which we *would* want to report as such (but still then fall back to wired IRQs if possible). Is the return value sufficient to differentiate the "there is no MSI parent" and "there are MSIs but something went wrong" cases, or is it more complicated than that?

Indeed. How about checking dev->msi_domain first, which should tell you whether it is even possible to allocate MSIs, and fallback to wired IRQs instead. That way, we keep the warning on genuine failures to allocate MSIs, and you get to add a nice "Falling back to wired interrupts" message when msi_domain is NULL.

Thoughts?

	M.
Quoted 23 lines

Robin.

Quoted 20 lines
---
  drivers/iommu/arm-smmu-v3.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/arm-smmu-v3.c +1 -1
index 744592d..2118fda 100644
@@ -2331,7 +2331,7 @@ static void arm_smmu_setup_msis(struct arm_smmu_device *smmu)
  	/* Allocate MSIs for evtq, gerror and priq. Ignore cmdq */
  	ret = platform_msi_domain_alloc_irqs(dev, nvec, arm_smmu_write_msi_msg);
  	if (ret) {
-		dev_warn(dev, "failed to allocate MSIs\n");
+		dev_info(dev, "failed to allocate MSIs\n");
  		return;
  	}
 
Signature · 1 line
Jazz is not dead. It just smells funny...
maintainer
#3 lore raw
Quoted 9 lines · Marc Zyngier

On 17/01/18 18:54, Robin Murphy wrote:

Indeed. How about checking dev->msi_domain first, which should tell you whether it is even possible to allocate MSIs, and fallback to wired IRQs instead. That way, we keep the warning on genuine failures to allocate MSIs, and you get to add a nice "Falling back to wired interrupts" message when msi_domain is NULL.

Thoughts?

That sounds much better then the proposed patch. I am not really interested in changing log-levels to make test-tools happy.

Joerg