Skip to content

Commit e6cc6f1

Browse files
rchatreKAGA-KOKO
authored andcommitted
PCI/MSI: Clarify usage of pci_msix_free_irq()
pci_msix_free_irq() is used to free an interrupt on a PCI/MSI-X interrupt domain. The API description specifies that the interrupt to be freed was allocated via pci_msix_alloc_irq_at(). This description limits the usage of pci_msix_free_irq() since pci_msix_free_irq() can also be used to free MSI-X interrupts allocated with, for example, pci_alloc_irq_vectors(). Remove the text stating that the interrupt to be freed had to be allocated with pci_msix_alloc_irq_at(). The needed struct msi_map need not be from pci_msix_alloc_irq_at() but can be created from scratch using pci_irq_vector() to obtain the Linux IRQ number. Highlight that pci_msix_free_irq() cannot be used to disable MSI-X to guide users that, for example, pci_free_irq_vectors() remains to be needed. Signed-off-by: Reinette Chatre <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Kevin Tian <[email protected]> Link: https://lore.kernel.org/lkml/87r0xsd8j4.ffs@tglx Link: https://lore.kernel.org/r/4c3e7a50d6e70f408812cd7ab199c6b4b326f9de.1676408572.git.reinette.chatre@intel.com
1 parent 0af2795 commit e6cc6f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/pci/msi/api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,11 @@ EXPORT_SYMBOL_GPL(pci_msix_alloc_irq_at);
163163

164164
/**
165165
* pci_msix_free_irq - Free an interrupt on a PCI/MSIX interrupt domain
166-
* which was allocated via pci_msix_alloc_irq_at()
167166
*
168167
* @dev: The PCI device to operate on
169168
* @map: A struct msi_map describing the interrupt to free
170-
* as returned from the allocation function.
169+
*
170+
* Undo an interrupt vector allocation. Does not disable MSI-X.
171171
*/
172172
void pci_msix_free_irq(struct pci_dev *dev, struct msi_map map)
173173
{

0 commit comments

Comments
 (0)