From patchwork Sat Jan 20 18:08:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nate Watterson X-Patchwork-Id: 10176637 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8FDFB6056F for ; Sat, 20 Jan 2018 18:08:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 85AC52013C for ; Sat, 20 Jan 2018 18:08:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7961120174; Sat, 20 Jan 2018 18:08:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0BDB62013C for ; Sat, 20 Jan 2018 18:08:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=6ex5QP3+Nl53v5KhnCv/9r/ByBZhFQn+fnBGEozXAa0=; b=VQr /JmoZFvKtI0OofjR6azrrhUyhI4oB4WeFuUidQmzxuvtEJeqy5Fh4hDuZ4PEjb+setnfvkqtSIjU7 V0W+TeUCHFJJ9275ZHEqeUzs4AB1zLIWAtkLb95c04d8fCQL/0UMANNNUlJ9u3CcBwtQrs4Cm+mOX LSw//IaDs9O4rCKlpgce1NXp601GS4RMcJag0+Wg63peX6+97BJxn7N0hpKG1u0NhZBbQoA6Sh6tv 4FojaPiaywuTkAb5mn7ly9eEJxdY99RT2GEhmDS6TaBNwAPCc+JlCc4jmWHONYMUHsvGkelMBeakd PSJUPWk1LquhFH+mkZNCXZxR0EUXvwg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1ecxZ5-0007Du-73; Sat, 20 Jan 2018 18:08:27 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ecxZ1-0007DD-JL for linux-arm-kernel@lists.infradead.org; Sat, 20 Jan 2018 18:08:25 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id D288F609FD; Sat, 20 Jan 2018 18:08:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1516471690; bh=elHYCmnL4xHjU513cgKmGrWGub3F0lnJsTe3knE2K40=; h=From:To:Cc:Subject:Date:From; b=LYZzfQ/44xr4GV8S1fm/1n0zd7ngpjeGBhpKgBfMEuIrJXSF1rE9EUYpPX0GVRxfq MphMOv0JKokzkZZxb6LeNxWI8bZLufboUlBEwGDjL7MbaFi20XQNVsTJC6uV/P9JkF Y/eD+KktloJAzxXqaeU6IAIu7xx6s/JbjgSXgRPA= Received: from ssd-mint172.qualcomm.com (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: nwatters@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 6F32B60265; Sat, 20 Jan 2018 18:08:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1516471690; bh=elHYCmnL4xHjU513cgKmGrWGub3F0lnJsTe3knE2K40=; h=From:To:Cc:Subject:Date:From; b=LYZzfQ/44xr4GV8S1fm/1n0zd7ngpjeGBhpKgBfMEuIrJXSF1rE9EUYpPX0GVRxfq MphMOv0JKokzkZZxb6LeNxWI8bZLufboUlBEwGDjL7MbaFi20XQNVsTJC6uV/P9JkF Y/eD+KktloJAzxXqaeU6IAIu7xx6s/JbjgSXgRPA= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 6F32B60265 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=nwatters@codeaurora.org From: Nate Watterson To: Will Deacon , Robin Murphy , Joerg Roedel , linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] iommu/arm-smmu-v3: limit reporting of MSI allocation failures Date: Sat, 20 Jan 2018 13:08:04 -0500 Message-Id: <1516471684-25052-1-git-send-email-nwatters@codeaurora.org> X-Mailer: git-send-email 1.9.1 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marc.zyngier@arm.com, Sinan Kaya , Nate Watterson MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Marc Zyngier --- 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; }