Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp471109pxb; Thu, 25 Feb 2021 07:15:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJwyFYwk/vHOWbFoWhf3UZo8ZrgX0Doc48n3vffhPG4NJBY71iZoPDZk353vq7mf2f+lg1to X-Received: by 2002:a17:906:73c2:: with SMTP id n2mr3126225ejl.224.1614266133371; Thu, 25 Feb 2021 07:15:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614266133; cv=none; d=google.com; s=arc-20160816; b=h97/No0FQtwBtN0lhvcZbnYvr4/oTBsFFrasvjDLC7NCW9UuXvY9GYHrwactuS4Skb aFRUI/Sayy2hOMRJvHcDDd2Hbcjgky5SWPQTU/ei0Nr37yOwwvXtbD/pFRtfbEnaTdRF wmlTALT1jPRiLhY8znAAdpT45UOCwM3ewJL1MmoV8sjICtESz8L4BryqKoda93JJpQ6p 483uWzbC+YnUcHElOZCC3RXrNJNva8R7ddkjZJknaygKgkomu3tRGTQdW6U1K0QkyQhI SlfkqR+R4DqkfTIDraaTajCiQCEh8F3+DpvhCq9jTb5YrSqFGuX0QYdfOrfZLnnDOxzn xMSA== 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=XfLRkB16/V4b/8s+avWcpG3zzokuf+mrYPuNG7EW/dQ=; b=clOcB7SgOIQ8AvXxqxmgpoyJOf4qC+BygP3V5/G8qskBE+/pBeVw4OGMSjeV160pkV iyawf2B/bRnlbwuHa6vAku+aekGYMvwjDcXWH77505O4sDvEPdG8ThDH/v8KDeujJ0S1 XuGy8NUornP61HI6RBX+kYpODMVaGfRDWOLVowly3x9E/bA6aA9bc1YARPdaRxkGw/Ev MTdPch/g59jn7kKkOrZQ8425yAj1uLBuSA8gm+F5CSNPEgLDGX01OHvIjKuf6LJHvwtQ wTaLCSkqNXEZNkSti6pW3sBMrvuvGXRC0NsNNpyFwRVW0olj+rYWlfmXnX+FmeGQf4n4 uqmg== 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.15.09; Thu, 25 Feb 2021 07:15:33 -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 S233016AbhBYPNJ (ORCPT + 99 others); Thu, 25 Feb 2021 10:13:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:40581 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232290AbhBYPMX (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 A38E264F17; Thu, 25 Feb 2021 15:11:04 +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 1lFIIA-00Fscv-Oe; Thu, 25 Feb 2021 15:11:02 +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 05/13] PCI: MSI: Drop use of msi_controller from core code Date: Thu, 25 Feb 2021 15:10:15 +0000 Message-Id: <20210225151023.3642391-6-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 As there is no driver using msi_controller, we can now safely remove its use from the PCI probe code. Signed-off-by: Marc Zyngier --- drivers/pci/msi.c | 23 +---------------------- drivers/pci/probe.c | 2 -- include/linux/pci.h | 2 -- 3 files changed, 1 insertion(+), 26 deletions(-) diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 3162f88fe940..79b5a995bd02 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -64,39 +64,18 @@ static void pci_msi_teardown_msi_irqs(struct pci_dev *dev) /* Arch hooks */ int __weak arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc) { - struct msi_controller *chip = dev->bus->msi; - int err; - - if (!chip || !chip->setup_irq) - return -EINVAL; - - err = chip->setup_irq(chip, dev, desc); - if (err < 0) - return err; - - irq_set_chip_data(desc->irq, chip); - - return 0; + return -EINVAL; } void __weak arch_teardown_msi_irq(unsigned int irq) { - struct msi_controller *chip = irq_get_chip_data(irq); - - if (!chip || !chip->teardown_irq) - return; - - chip->teardown_irq(chip, irq); } int __weak arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) { - struct msi_controller *chip = dev->bus->msi; struct msi_desc *entry; int ret; - if (chip && chip->setup_irqs) - return chip->setup_irqs(chip, dev, nvec, type); /* * If an architecture wants to support multiple MSI, it needs to * override arch_setup_msi_irqs() diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 953f15abc850..fb04fc81a8bd 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -895,7 +895,6 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge) /* Temporarily move resources off the list */ list_splice_init(&bridge->windows, &resources); bus->sysdata = bridge->sysdata; - bus->msi = bridge->msi; bus->ops = bridge->ops; bus->number = bus->busn_res.start = bridge->busnr; #ifdef CONFIG_PCI_DOMAINS_GENERIC @@ -1053,7 +1052,6 @@ static struct pci_bus *pci_alloc_child_bus(struct pci_bus *parent, return NULL; child->parent = parent; - child->msi = parent->msi; child->sysdata = parent->sysdata; child->bus_flags = parent->bus_flags; diff --git a/include/linux/pci.h b/include/linux/pci.h index b32126d26997..105ef1a5191e 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -540,7 +540,6 @@ struct pci_host_bridge { int (*map_irq)(const struct pci_dev *, u8, u8); void (*release_fn)(struct pci_host_bridge *); void *release_data; - struct msi_controller *msi; unsigned int ignore_reset_delay:1; /* For entire hierarchy */ unsigned int no_ext_tags:1; /* No Extended Tags */ unsigned int native_aer:1; /* OS may use PCIe AER */ @@ -621,7 +620,6 @@ struct pci_bus { struct resource busn_res; /* Bus numbers routed to this bus */ struct pci_ops *ops; /* Configuration access functions */ - struct msi_controller *msi; /* MSI controller */ void *sysdata; /* Hook for sys-specific extension */ struct proc_dir_entry *procdir; /* Directory entry in /proc/bus/pci */ -- 2.29.2