From: Bjorn Helgaas <helgaas@kernel.org>
To: linux-pci@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
Kevin Tian <kevin.tian@intel.com>, Marc Zyngier <maz@kernel.org>,
Reinette Chatre <reinette.chatre@intel.com>,
Jason Gunthorpe <jgg@nvidia.com>,
Alex Williamson <alex.williamson@redhat.com>,
Dave Jiang <dave.jiang@intel.com>,
Megha Dey <megha.dey@intel.com>,
linux-kernel@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>
Subject: [PATCH 2/3] Revert "PCI/MSI: Provide pci_ims_alloc/free_irq()"
Date: Mon, 1 Apr 2024 18:23:25 -0500 [thread overview]
Message-ID: <20240401232326.1794707-3-helgaas@kernel.org> (raw)
In-Reply-To: <20240401232326.1794707-1-helgaas@kernel.org>
From: Bjorn Helgaas <bhelgaas@google.com>
This reverts commit c9e5bea273834a63b5e9ba90ad94b305ba50704e.
IMS (Interrupt Message Store) support appeared in v6.2, but there are no
users yet.
Remove it for now. We can add it back when a user comes along. If this is
re-added later, the relevant part of 41efa431244f ("PCI/MSI: Provide stubs
for IMS functions") should be squashed into it.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
drivers/pci/msi/api.c | 50 -------------------------------------------
include/linux/pci.h | 3 ---
2 files changed, 53 deletions(-)
diff --git a/drivers/pci/msi/api.c b/drivers/pci/msi/api.c
index be679aa5db64..3c1cd29c5cf2 100644
--- a/drivers/pci/msi/api.c
+++ b/drivers/pci/msi/api.c
@@ -365,56 +365,6 @@ const struct cpumask *pci_irq_get_affinity(struct pci_dev *dev, int nr)
}
EXPORT_SYMBOL(pci_irq_get_affinity);
-/**
- * pci_ims_alloc_irq - Allocate an interrupt on a PCI/IMS interrupt domain
- * @dev: The PCI device to operate on
- * @icookie: Pointer to an IMS implementation specific cookie for this
- * IMS instance (PASID, queue ID, pointer...).
- * The cookie content is copied into the MSI descriptor for the
- * interrupt chip callbacks or domain specific setup functions.
- * @affdesc: Optional pointer to an interrupt affinity descriptor
- *
- * There is no index for IMS allocations as IMS is an implementation
- * specific storage and does not have any direct associations between
- * index, which might be a pure software construct, and device
- * functionality. This association is established by the driver either via
- * the index - if there is a hardware table - or in case of purely software
- * managed IMS implementation the association happens via the
- * irq_write_msi_msg() callback of the implementation specific interrupt
- * chip, which utilizes the provided @icookie to store the MSI message in
- * the appropriate place.
- *
- * Return: A struct msi_map
- *
- * On success msi_map::index contains the allocated index (>= 0) and
- * msi_map::virq the allocated Linux interrupt number (> 0).
- *
- * On fail msi_map::index contains the error code and msi_map::virq
- * is set to 0.
- */
-struct msi_map pci_ims_alloc_irq(struct pci_dev *dev, union msi_instance_cookie *icookie,
- const struct irq_affinity_desc *affdesc)
-{
- return msi_domain_alloc_irq_at(&dev->dev, MSI_SECONDARY_DOMAIN, MSI_ANY_INDEX,
- affdesc, icookie);
-}
-EXPORT_SYMBOL_GPL(pci_ims_alloc_irq);
-
-/**
- * pci_ims_free_irq - Allocate an interrupt on a PCI/IMS interrupt domain
- * which was allocated via pci_ims_alloc_irq()
- * @dev: The PCI device to operate on
- * @map: A struct msi_map describing the interrupt to free as
- * returned from pci_ims_alloc_irq()
- */
-void pci_ims_free_irq(struct pci_dev *dev, struct msi_map map)
-{
- if (WARN_ON_ONCE(map.index < 0 || map.virq <= 0))
- return;
- msi_domain_free_irqs_range(&dev->dev, MSI_SECONDARY_DOMAIN, map.index, map.index);
-}
-EXPORT_SYMBOL_GPL(pci_ims_free_irq);
-
/**
* pci_free_irq_vectors() - Free previously allocated IRQs for a device
* @dev: the PCI device to operate on
diff --git a/include/linux/pci.h b/include/linux/pci.h
index abbef75b2b92..3deb3e42d990 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -2668,9 +2668,6 @@ struct msi_domain_template;
bool pci_create_ims_domain(struct pci_dev *pdev, const struct msi_domain_template *template,
unsigned int hwsize, void *data);
-struct msi_map pci_ims_alloc_irq(struct pci_dev *pdev, union msi_instance_cookie *icookie,
- const struct irq_affinity_desc *affdesc);
-void pci_ims_free_irq(struct pci_dev *pdev, struct msi_map map);
#include <linux/dma-mapping.h>
--
2.34.1
next prev parent reply other threads:[~2024-04-01 23:23 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-03 23:15 [PATCH 0/8] arch/ typo fixes Bjorn Helgaas
2024-01-03 23:15 ` [PATCH 1/8] alpha: Fix typos Bjorn Helgaas
2024-01-04 0:24 ` Randy Dunlap
2024-01-03 23:15 ` [PATCH 2/8] ARC: " Bjorn Helgaas
2024-01-04 0:31 ` Randy Dunlap
2024-01-04 19:02 ` Bjorn Helgaas
2024-03-29 19:26 ` Vineet Gupta
2024-03-29 22:14 ` [PATCH v2] " Bjorn Helgaas
2024-03-30 1:00 ` Vineet Gupta
2024-04-01 23:23 ` [PATCH 0/3] PCI/MSI: Remove IMS (Interrupt Message Store) support for now Bjorn Helgaas
2024-04-01 23:23 ` [PATCH 1/3] Revert "PCI/MSI: Provide stubs for IMS functions" Bjorn Helgaas
2024-04-02 2:46 ` Tian, Kevin
2024-04-01 23:23 ` Bjorn Helgaas [this message]
2024-04-02 2:47 ` [PATCH 2/3] Revert "PCI/MSI: Provide pci_ims_alloc/free_irq()" Tian, Kevin
2024-04-01 23:23 ` [PATCH 3/3] Revert "PCI/MSI: Provide IMS (Interrupt Message Store) support" Bjorn Helgaas
2024-04-02 2:48 ` Tian, Kevin
2024-04-02 2:45 ` [PATCH 0/3] PCI/MSI: Remove IMS (Interrupt Message Store) support for now Tian, Kevin
2024-04-02 16:42 ` Bjorn Helgaas
2024-01-03 23:16 ` [PATCH 3/8] arm64: Fix typos Bjorn Helgaas
2024-01-04 1:06 ` Randy Dunlap
2024-01-03 23:16 ` [PATCH 4/8] arm64: dts: " Bjorn Helgaas
2024-01-04 1:01 ` Randy Dunlap
2024-01-03 23:16 ` [PATCH 5/8] KVM: arm64: " Bjorn Helgaas
2024-01-04 0:59 ` Randy Dunlap
2024-01-15 12:01 ` Zenghui Yu
2024-02-24 4:39 ` Zenghui Yu
2024-02-24 9:12 ` Oliver Upton
2024-02-24 9:15 ` (subset) " Oliver Upton
2024-01-03 23:16 ` [PATCH 6/8] MIPS: " Bjorn Helgaas
2024-01-04 0:56 ` Randy Dunlap
2024-01-08 9:41 ` Thomas Bogendoerfer
2024-01-03 23:16 ` [PATCH 7/8] powerpc: " Bjorn Helgaas
2024-01-04 0:37 ` Randy Dunlap
2024-05-08 13:49 ` Michael Ellerman
2024-01-03 23:16 ` [PATCH 8/8] sparc: " Bjorn Helgaas
2024-01-04 0:41 ` Randy Dunlap
2024-02-16 16:19 ` Andreas Larsson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240401232326.1794707-3-helgaas@kernel.org \
--to=helgaas@kernel.org \
--cc=alex.williamson@redhat.com \
--cc=bhelgaas@google.com \
--cc=dave.jiang@intel.com \
--cc=jgg@nvidia.com \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=maz@kernel.org \
--cc=megha.dey@intel.com \
--cc=reinette.chatre@intel.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox