From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751125AbeAVLpS (ORCPT ); Mon, 22 Jan 2018 06:45:18 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:57610 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750886AbeAVLpR (ORCPT ); Mon, 22 Jan 2018 06:45:17 -0500 Subject: Re: [PATCH v2] iommu/arm-smmu-v3: limit reporting of MSI allocation failures To: Nate Watterson , Will Deacon , Robin Murphy , Joerg Roedel , linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Cc: Sinan Kaya References: <1516471684-25052-1-git-send-email-nwatters@codeaurora.org> From: Marc Zyngier Organization: ARM Ltd Message-ID: <39eee30e-1298-24d5-926b-9cd7fe532e59@arm.com> Date: Mon, 22 Jan 2018 11:45:14 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <1516471684-25052-1-git-send-email-nwatters@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20/01/18 18:08, Nate Watterson wrote: > Currently, the arm-smmu-v3 driver expects to allocate MSIs for all SMMUs > with FEAT_MSI set. This results in unwarranted "failed to allocate MSIs" > warnings being printed on systems where FW was either deliberately > configured to force the use of SMMU wired interrupts -or- is altogether > incapable of describing SMMU MSI topology (ACPI IORT prior to rev.C). > > Remedy this by checking msi_domain before attempting to allocate SMMU > MSIs. > > Signed-off-by: Nate Watterson > Signed-off-by: Sinan Kaya > --- > drivers/iommu/arm-smmu-v3.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c > index 744592d..00de028 100644 > --- a/drivers/iommu/arm-smmu-v3.c > +++ b/drivers/iommu/arm-smmu-v3.c > @@ -2328,10 +2328,15 @@ static void arm_smmu_setup_msis(struct arm_smmu_device *smmu) > if (!(smmu->features & ARM_SMMU_FEAT_MSI)) > return; > > + if (!dev->msi_domain) { > + dev_info(smmu->dev, "msi_domain absent - falling back to wired irqs\n"); > + return; > + } > + > /* 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_warn(dev, "failed to allocate MSIs - falling back to wired irqs\n"); > return; > } > > Acked-by: Marc Zyngier M. -- Jazz is not dead. It just smells funny...