Skip to content

Commit 1794808

Browse files
committed
Revert "PCI/MSI: Provide pci_ims_alloc/free_irq()"
This reverts commit c9e5bea. 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 41efa43 ("PCI/MSI: Provide stubs for IMS functions") should be squashed into it. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Kevin Tian <[email protected]> Reviewed-by: Thomas Gleixner <[email protected]>
1 parent 372c669 commit 1794808

File tree

2 files changed

+0
-53
lines changed

2 files changed

+0
-53
lines changed

drivers/pci/msi/api.c

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -365,56 +365,6 @@ const struct cpumask *pci_irq_get_affinity(struct pci_dev *dev, int nr)
365365
}
366366
EXPORT_SYMBOL(pci_irq_get_affinity);
367367

368-
/**
369-
* pci_ims_alloc_irq - Allocate an interrupt on a PCI/IMS interrupt domain
370-
* @dev: The PCI device to operate on
371-
* @icookie: Pointer to an IMS implementation specific cookie for this
372-
* IMS instance (PASID, queue ID, pointer...).
373-
* The cookie content is copied into the MSI descriptor for the
374-
* interrupt chip callbacks or domain specific setup functions.
375-
* @affdesc: Optional pointer to an interrupt affinity descriptor
376-
*
377-
* There is no index for IMS allocations as IMS is an implementation
378-
* specific storage and does not have any direct associations between
379-
* index, which might be a pure software construct, and device
380-
* functionality. This association is established by the driver either via
381-
* the index - if there is a hardware table - or in case of purely software
382-
* managed IMS implementation the association happens via the
383-
* irq_write_msi_msg() callback of the implementation specific interrupt
384-
* chip, which utilizes the provided @icookie to store the MSI message in
385-
* the appropriate place.
386-
*
387-
* Return: A struct msi_map
388-
*
389-
* On success msi_map::index contains the allocated index (>= 0) and
390-
* msi_map::virq the allocated Linux interrupt number (> 0).
391-
*
392-
* On fail msi_map::index contains the error code and msi_map::virq
393-
* is set to 0.
394-
*/
395-
struct msi_map pci_ims_alloc_irq(struct pci_dev *dev, union msi_instance_cookie *icookie,
396-
const struct irq_affinity_desc *affdesc)
397-
{
398-
return msi_domain_alloc_irq_at(&dev->dev, MSI_SECONDARY_DOMAIN, MSI_ANY_INDEX,
399-
affdesc, icookie);
400-
}
401-
EXPORT_SYMBOL_GPL(pci_ims_alloc_irq);
402-
403-
/**
404-
* pci_ims_free_irq - Allocate an interrupt on a PCI/IMS interrupt domain
405-
* which was allocated via pci_ims_alloc_irq()
406-
* @dev: The PCI device to operate on
407-
* @map: A struct msi_map describing the interrupt to free as
408-
* returned from pci_ims_alloc_irq()
409-
*/
410-
void pci_ims_free_irq(struct pci_dev *dev, struct msi_map map)
411-
{
412-
if (WARN_ON_ONCE(map.index < 0 || map.virq <= 0))
413-
return;
414-
msi_domain_free_irqs_range(&dev->dev, MSI_SECONDARY_DOMAIN, map.index, map.index);
415-
}
416-
EXPORT_SYMBOL_GPL(pci_ims_free_irq);
417-
418368
/**
419369
* pci_free_irq_vectors() - Free previously allocated IRQs for a device
420370
* @dev: the PCI device to operate on

include/linux/pci.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2668,9 +2668,6 @@ struct msi_domain_template;
26682668

26692669
bool pci_create_ims_domain(struct pci_dev *pdev, const struct msi_domain_template *template,
26702670
unsigned int hwsize, void *data);
2671-
struct msi_map pci_ims_alloc_irq(struct pci_dev *pdev, union msi_instance_cookie *icookie,
2672-
const struct irq_affinity_desc *affdesc);
2673-
void pci_ims_free_irq(struct pci_dev *pdev, struct msi_map map);
26742671

26752672
#include <linux/dma-mapping.h>
26762673

0 commit comments

Comments
 (0)