Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3667856pxf; Mon, 22 Mar 2021 11:57:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3/OdjvQyyoyJqusfu5C+r94xJKeIOr3nTSz2LFDwuUE+xLm33/6+AdIwSX3OoNsykeBQj X-Received: by 2002:a17:907:2075:: with SMTP id qp21mr1204742ejb.451.1616439445953; Mon, 22 Mar 2021 11:57:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616439445; cv=none; d=google.com; s=arc-20160816; b=aYZKOgD4KsJog8K+qwBjfAIkWEUbJFVO6an6WtK+R0VPImS6ZR1l/0c0Qy7D3sMA4L +z4Ar5qst7fX+hiU58WwKgMOBYB1saQ7eBMhLcepMXFG9MB7NvXkS7TmBoX8Q+BoNEoI XkjccrzcbTY7jOZh8Zror8skVJYpQyJQW79fd3+7vtVRF8IBotR4/9fg95zZVXBcowo7 Jp3LEpoh9/DVoXNoODcs5QxR7RURvDzsP/LxyaS2qb5HMjG9j+z3Ig2IAx7I6f/Ao++j 84lLsmuWwhGpuvMe7RvhNw4xeHh4fFWbUVai0hOgc4cYtYZ8X8sR+tZM3ECq08pa77Fo 825Q== 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=ta1ME6QyPjasFqAZWALIKlgP7OdllDkJdvJYX9vdwrs=; b=b0cdNK8CN1rb1/CDSOBCkuVIvP4UVrIrIckn04NU8cYC6GcoRLiiWfvYMoaVSwkjFq WzkJxtfaYZmNNDCI6IbXGjyu7eg0Xz0nDN+G8Z7jfewIzkqK+AzjLR4Lvts0uz7zmoYX ZBRf+bMQ9OwUTu0bs+KgCFbhfYVoftRRuu1X3pGRWCbILUWe38JtFrnZ8UIY32OJobZ0 mWbQ3p21W4kY16CWrkTMZBMF58/wdbIjO6faDlECQvFTiKajYjvOQigjBmx+6vEvoYes Gua9tK7eYapkVqc9Y23cqKFDE5ThYqJUCSNGXYuDQU1x4Mybzc8J0SbD0Y9uLDgl1hOT DOQA== 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 v24si12816457eja.84.2021.03.22.11.57.03; Mon, 22 Mar 2021 11:57:25 -0700 (PDT) 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 S232291AbhCVSyU (ORCPT + 99 others); Mon, 22 Mar 2021 14:54:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:37566 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231728AbhCVSxq (ORCPT ); Mon, 22 Mar 2021 14:53:46 -0400 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 1C6B161998; Mon, 22 Mar 2021 18:53:46 +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 1lOPZR-0038p5-66; Mon, 22 Mar 2021 18:46:33 +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 , Michael Kelley , 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, kernel-team@android.com Subject: [PATCH v2 10/15] PCI/MSI: Let PCI host bridges declare their lack of MSI handling Date: Mon, 22 Mar 2021 18:46:09 +0000 Message-Id: <20210322184614.802565-11-maz@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210322184614.802565-1-maz@kernel.org> References: <20210322184614.802565-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, mikelley@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, kernel-team@android.com 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. Acked-by: Bjorn Helgaas 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 ebf557e59d87..48605cca82ae 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