Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp468516pxb; Thu, 25 Feb 2021 07:12:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJz3wSlDlRHB5gu2IUglLyE8MXcRExOe/kb2I9zOBegdsV87tu1sYBPHXX1cVfB8xzywFk+M X-Received: by 2002:a05:6402:278a:: with SMTP id b10mr3429997ede.347.1614265956552; Thu, 25 Feb 2021 07:12:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614265956; cv=none; d=google.com; s=arc-20160816; b=HJnBPsb5xVviT0cCofmOzfTp0BmHiPFjWz8m8Iz19cniW3mzZalpF7CKju8IMz9cR+ IdJxbda3nxBkY8l19U1Ih9PHZhMaX05Ri0b96OdNp7rBL57x59+pYhoLhlQqv/UnpW4z 2U+i3DtFNZyDaAdSV2cC0KtLlVpNtLSPrs4qW3tu7ohrDNBoUYyytUTbpum0aBEoZCBP 7+v/L26XFDZVTnk7E1ytUjff8ZEBWHgmBiN/zMEfE+Sc319m2dJQUroKrXvgCK22a9nv JzJXldYJet2/yQoIwaIbCNhKlV0DzyhCOMp0lNINhuJFHXnpPfmo791GTiDYPc/u4Ien j6ZQ== 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 :message-id:date:subject:cc:to:from; bh=ZT/nAwqXMT8A0D09HLU0vm7su1+erFxbeI7ow0eWiXo=; b=IBi7ByYFgv5YHBni0aGFn61zxHGuFA6NpACwGsFto0+eRYvbrkJKGadAg+I53kEVlm 4Cs84MW125k7vm0w7Wi2N1D3BNTnlW7fZIxBNTMrdJspgHCaCbXaIW849eaevzOYsc6E 2WbqA/BAh7Xk88zyAmHgkjSvkm1l22pykJVYOgDkvuLsb25dV+bDrLfGWtlgachWhAfR yJub9AA+Zmvjve9lKPdnEB3jJg5oeLChneEaBVyqI+PnG9jpPZRxK8UddbSpGXf0yfAI xtkt6VBsdWFdf/BArL06IGZULqAkfLWCXMiXsL1ClkZDh3rK36uNm1LbQ6eZNTu8S93v UiZQ== 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 gj20si3476244ejb.6.2021.02.25.07.12.13; Thu, 25 Feb 2021 07:12:36 -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 S230467AbhBYPLj (ORCPT + 99 others); Thu, 25 Feb 2021 10:11:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:40012 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229722AbhBYPLi (ORCPT ); Thu, 25 Feb 2021 10:11:38 -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 8508964F10; Thu, 25 Feb 2021 15:10:56 +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 1lFII2-00Fscv-9C; Thu, 25 Feb 2021 15:10:54 +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 00/13] PCI: MSI: Getting rid of msi_controller, and other cleanups Date: Thu, 25 Feb 2021 15:10:10 +0000 Message-Id: <20210225151023.3642391-1-maz@kernel.org> X-Mailer: git-send-email 2.29.2 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 The msi_controller data structure was the first attempt at treating MSIs like any other interrupt. We replaced it a few years ago with the generic MSI framework, but as it turns out, some older drivers are still using it. This series aims at converting these stragglers, drop msi_controller, and fix some other nits such as having ways for a host bridge to advertise whether it supports MSIs or not. A few notes: - The Tegra patch is the result of back and forth work with Thierry: I wrote the initial patch, which didn't work (I didn't have any HW at the time). Thierry made it work, and I subsequently fixed a couple of bugs/cleanups. I'm responsible for the result, so don't blame Thierry for any of it! FWIW, I'm now running a Jetson TX2 with its root fs over NVME, and MSIs are OK. - RCAR is totally untested, though Marek had a go at a previous version. More testing required. - The xilinx stuff is *really* untested. Paul, if you have a RISC-V board that uses it, could you please give it a go? Michal, same thing for the stuff you have at hand... - hyperv: I don't have access to such hypervisor, and no way to test it. Help welcomed. - The patches dealing with the advertising of MSI handling are the result of a long discussion that took place here[1]. I took the liberty to rejig Thomas' initial patches, and add what I needed for the MSI domain stuff. Again, blame me if something is wrong, and not Thomas. Feedback welcome. M. [1] https://lore.kernel.org/r/20201031140330.83768-1-linux@fw-web.de Marc Zyngier (11): PCI: tegra: Convert to MSI domains PCI: rcar: Convert to MSI domains PCI: xilinx: Convert to MSI domains PCI: hyperv: Drop msi_controller structure PCI: MSI: Drop use of msi_controller from core code PCI: MSI: Kill msi_controller structure PCI: MSI: Kill default_teardown_msi_irqs() PCI: MSI: Let PCI host bridges declare their reliance on MSI domains PCI: Make pci_host_common_probe() declare its reliance on MSI domains PCI: MSI: Document the various ways of ending up with NO_MSI PCI: quirks: Refactor advertising of the NO_MSI flag Thomas Gleixner (2): PCI: MSI: Let PCI host bridges declare their lack of MSI handling PCI: mediatek: Advertise lack of MSI handling drivers/pci/controller/Kconfig | 4 +- drivers/pci/controller/pci-host-common.c | 1 + drivers/pci/controller/pci-hyperv.c | 4 - drivers/pci/controller/pci-tegra.c | 343 ++++++++++++----------- drivers/pci/controller/pcie-mediatek.c | 4 + drivers/pci/controller/pcie-rcar-host.c | 342 +++++++++++----------- drivers/pci/controller/pcie-xilinx.c | 238 +++++++--------- drivers/pci/msi.c | 46 +-- drivers/pci/probe.c | 4 +- drivers/pci/quirks.c | 15 +- include/linux/msi.h | 17 +- include/linux/pci.h | 4 +- 12 files changed, 463 insertions(+), 559 deletions(-) -- 2.29.2