Received: by 10.223.148.5 with SMTP id 5csp6247635wrq; Wed, 17 Jan 2018 11:10:36 -0800 (PST) X-Google-Smtp-Source: ACJfBovaDIOqdq9Mk/+iVUoz68uR0i2U0nV8WXft8hzm90j6Dzb7eVXSiWHLunuiX3BA0J4L56Q7 X-Received: by 10.159.246.135 with SMTP id c7mr36668909pls.138.1516216235951; Wed, 17 Jan 2018 11:10:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516216235; cv=none; d=google.com; s=arc-20160816; b=jCuP9hjXEe/z0c/ydlHoIC9PvNXv6dE2DEwt8NW8JF/jYEWhOnuxpiO8rqqa165nv2 8eKvqc/OPEFuVoteGpls5kGcjHcoHKklw3tsEy8GS0Vpewu165WqqHqVs7DW7jz0E3tj aNk9OA/MTmXfemdVh9I0SnfUqPrQS7LP0lHsp7BqxoLOBmFg4fSeJq1v9nvZ13iEez6a 5dYvM/1h90FqDdUhNYIr6A5z6zSbAskeZY72duaOswT3zwvAR8s2g9P/a9NigVypDze4 cXutGGpWUAIM8r03XCsQrt4rsDJhJsXtA/PH9R/iwYmxv7jijHXaDiWCqmNW0Yk+82O2 VOWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :arc-authentication-results; bh=6BfA/JPmOQJ6j9WbNn0X5HirmHxZfsjm6uhuYcP+WeI=; b=O3lwhSvbo4XLP8dCkbkZt1UhZEObPIQ6EU6KydheXUGoAoMUnmjmSWtOhnaHbBpUIq E5NW7Th2e6+wu+RZPqPDcMrv1gM+o+vr/yQ0C5FuULe13B9aDduiO/beZIKxFWqeXaP0 UP60D7SPCupKgl7sTvn/J4LN+WgzLCmTyhLV/FRdeggkYz8yTNIe3P+rmb/8XL6Cz+aK GznwAapCLC3kPitchXfjtKkKgAowoAWMV0qe2d9iiTAZzEpr/4X+UiGDfiGTnPB1iEpO /UY5S41KpzwXR9jl0l+4Vu0iLkgMWEruKo2Bf20qi13tlgL8K+6a7qBGaHHoGv8bJMBW ooGQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b3si4304405pgc.330.2018.01.17.11.10.21; Wed, 17 Jan 2018 11:10:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752891AbeAQTIs (ORCPT + 99 others); Wed, 17 Jan 2018 14:08:48 -0500 Received: from foss.arm.com ([217.140.101.70]:46546 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752802AbeAQTIo (ORCPT ); Wed, 17 Jan 2018 14:08:44 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E2C9F80D; Wed, 17 Jan 2018 11:08:43 -0800 (PST) Received: from [10.1.207.62] (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 89F183F53D; Wed, 17 Jan 2018 11:08:42 -0800 (PST) Subject: Re: [PATCH] iommu/arm-smmu-v3: suppress MSI allocation failure message To: Robin Murphy , Nate Watterson , Will Deacon , Joerg Roedel , linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Cc: Sinan Kaya References: <1516214399-24012-1-git-send-email-nwatters@codeaurora.org> <2f651cfe-e006-cf1d-b624-08e2ba5340fc@arm.com> From: Marc Zyngier Organization: ARM Ltd Message-ID: <66706458-d971-be9b-4390-80a9be39248c@arm.com> Date: Wed, 17 Jan 2018 19:08:39 +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: <2f651cfe-e006-cf1d-b624-08e2ba5340fc@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17/01/18 18:54, Robin Murphy wrote: > [ +Marc just in case ] > > On 17/01/18 18:39, Nate Watterson wrote: >> From: Sinan Kaya >> >> 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? 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. > > Robin. > >> Signed-off-by: Sinan Kaya >> Signed-off-by: Nate Watterson >> --- >> drivers/iommu/arm-smmu-v3.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c >> index 744592d..2118fda 100644 >> --- a/drivers/iommu/arm-smmu-v3.c >> +++ b/drivers/iommu/arm-smmu-v3.c >> @@ -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; >> } >> >> -- Jazz is not dead. It just smells funny...