Skip to content

Commit

Permalink
PCI/MSI: Use msi_domain_info:: Bus_token
Browse files Browse the repository at this point in the history
Set the bus token in the msi_domain_info structure and let the core code
handle the update.

Signed-off-by: Ahmed S. Darwish <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]>
Acked-by: Bjorn Helgaas <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
Ahmed S. Darwish authored and KAGA-KOKO committed Nov 17, 2022
1 parent 22db089 commit 38c0c10
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions drivers/pci/msi/irqdomain.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ struct irq_domain *pci_msi_create_irq_domain(struct fwnode_handle *fwnode,
struct msi_domain_info *info,
struct irq_domain *parent)
{
struct irq_domain *domain;

if (WARN_ON(info->flags & MSI_FLAG_LEVEL_CAPABLE))
info->flags &= ~MSI_FLAG_LEVEL_CAPABLE;

Expand All @@ -178,13 +176,10 @@ struct irq_domain *pci_msi_create_irq_domain(struct fwnode_handle *fwnode,

/* PCI-MSI is oneshot-safe */
info->chip->flags |= IRQCHIP_ONESHOT_SAFE;
/* Let the core update the bus token */
info->bus_token = DOMAIN_BUS_PCI_MSI;

domain = msi_create_irq_domain(fwnode, info, parent);
if (!domain)
return NULL;

irq_domain_update_bus_token(domain, DOMAIN_BUS_PCI_MSI);
return domain;
return msi_create_irq_domain(fwnode, info, parent);
}
EXPORT_SYMBOL_GPL(pci_msi_create_irq_domain);

Expand Down

0 comments on commit 38c0c10

Please sign in to comment.