Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp472868pxb; Thu, 25 Feb 2021 07:17:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJzcw+fDtQSTvLBHdfefpdk7SvXB7gIfMbml0GSehv5Rdyt6LA+2kugtViYBshB/Myyupgdr X-Received: by 2002:a17:906:f01:: with SMTP id z1mr3240684eji.235.1614266248493; Thu, 25 Feb 2021 07:17:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614266248; cv=none; d=google.com; s=arc-20160816; b=j4Asz2EH6tAoCVFUkX8006aWxeUcIMIlyJ6RlXpEEC70bobub383bPDiMXqgsGR0rO fH1TJlnYmuOJbm+Cwf/yqVkM632P3g+jWrkGGFmXWqs5DzhjcU+9+z4JTT0KPLxv9rWL +YAgRspRSdeJYN2emhLCpDF2yizYbDS70AT+U7dcaQODFXYugearW4VRFCUvTv8KF4Nn cedAr0jLhrB3F7xveiu4mLN+r2DZPgLA7J7+0jteIxr6uDlxZBomkZlS0TAiQR5Py4rS 4CynuIk/2NgYH6DwS6TLxI551D2cuTrkEPyGDDp4iNNVEpr/VHhUjdKT0a/t8fxZlmfA VhJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=U9R5bqulNGeAG/x27RNzmBgRUHBBbUWHJvm0r+JGX7g=; b=O+D+nMFjc1+Bcl7Xnxkp/HcQIYc1Jr64L9eZE58qj7F/WTJs+/jSU8rfcoehOCpOvn hw8skA8h2Fd5gEYM9bAKDR8QTlbiap2+Zr4WC0FETlZTmJbfeeztNK6HGcrRCkSt7/sh 0xDmn2DAAsjHNAtZyDXwVE9Wc+M0VeGIZGIoAiWEqCHO7PiArmfJ0POflgFjE/qOFS0c umTtm8LsfrYo4mI6Zw9v863EH9i8VkEsCEGI5RITdJyF5qEPVgx/CfqG4U8ukLGHVm9k B2t/tIPc7CIvabU+6AWEQ2H2Vv/lfa8HXGMdfPa0+qTkJgYIAHuh5X8DOAKMcch0oBAg RiRg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bz18si3615576ejc.328.2021.02.25.07.17.02; Thu, 25 Feb 2021 07:17:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230467AbhBYPNx (ORCPT + 99 others); Thu, 25 Feb 2021 10:13:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:40604 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232296AbhBYPMX (ORCPT ); Thu, 25 Feb 2021 10:12:23 -0500 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0DCE864F1D; Thu, 25 Feb 2021 15:11:08 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lFIIE-00Fscv-8c; Thu, 25 Feb 2021 15:11:06 +0000 From: Marc Zyngier To: Lorenzo Pieralisi , Bjorn Helgaas Cc: Frank Wunderlich , Thierry Reding , Thomas Gleixner , Rob Herring , Will Deacon , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Thierry Reding , Jonathan Hunter , Ryder Lee , Marek Vasut , Yoshihiro Shimoda , Michal Simek , Paul Walmsley , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-hyperv@vger.kernel.org, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-renesas-soc@vger.kernel.org Subject: [PATCH 08/13] PCI: MSI: Let PCI host bridges declare their lack of MSI handling Date: Thu, 25 Feb 2021 15:10:18 +0000 Message-Id: <20210225151023.3642391-9-maz@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210225151023.3642391-1-maz@kernel.org> References: <20210225151023.3642391-1-maz@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: lorenzo.pieralisi@arm.com, bhelgaas@google.com, frank-w@public-files.de, treding@nvidia.com, tglx@linutronix.de, robh@kernel.org, will@kernel.org, kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, wei.liu@kernel.org, thierry.reding@gmail.com, jonathanh@nvidia.com, ryder.lee@mediatek.com, marek.vasut+renesas@gmail.com, yoshihiro.shimoda.uh@renesas.com, michal.simek@xilinx.com, paul.walmsley@sifive.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-hyperv@vger.kernel.org, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-renesas-soc@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Gleixner Some PCI host bridges cannot deal with MSIs at all. This has the unfortunate effect of triggering ugly warnings when an end-point driver requests MSIs. Instead, let the bridge advertise such lack of MSIs, so that it can be flagged correctly by the core code. Signed-off-by: Thomas Gleixner [maz: commit message] Signed-off-by: Marc Zyngier --- drivers/pci/probe.c | 2 ++ include/linux/pci.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index fb04fc81a8bd..146bd85c037e 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -925,6 +925,8 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge) device_enable_async_suspend(bus->bridge); pci_set_bus_of_node(bus); pci_set_bus_msi_domain(bus); + if (bridge->no_msi) + bus->bus_flags |= PCI_BUS_FLAGS_NO_MSI; if (!parent) set_dev_node(bus->bridge, pcibus_to_node(bus)); diff --git a/include/linux/pci.h b/include/linux/pci.h index 105ef1a5191e..9db3abf9fd90 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -550,6 +550,7 @@ struct pci_host_bridge { unsigned int native_dpc:1; /* OS may use PCIe DPC */ unsigned int preserve_config:1; /* Preserve FW resource setup */ unsigned int size_windows:1; /* Enable root bus sizing */ + unsigned int no_msi:1; /* Bridge has no MSI support */ /* Resource alignment requirements */ resource_size_t (*align_resource)(struct pci_dev *dev, -- 2.29.2