Skip to content

Commit c459f11

Browse files
committed
genirq/msi: Remove unused alloc/free interfaces
Now that all users are converted remove the old interfaces. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Acked-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20221124230314.694291814@linutronix.de
1 parent 811b328 commit c459f11

File tree

2 files changed

+0
-80
lines changed

2 files changed

+0
-80
lines changed

include/linux/msi.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -487,13 +487,6 @@ int msi_domain_set_affinity(struct irq_data *data, const struct cpumask *mask,
487487
struct irq_domain *msi_create_irq_domain(struct fwnode_handle *fwnode,
488488
struct msi_domain_info *info,
489489
struct irq_domain *parent);
490-
int msi_domain_alloc_irqs_descs_locked(struct irq_domain *domain, struct device *dev,
491-
int nvec);
492-
int msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev,
493-
int nvec);
494-
495-
void msi_domain_free_irqs_descs_locked(struct irq_domain *domain, struct device *dev);
496-
void msi_domain_free_irqs(struct irq_domain *domain, struct device *dev);
497490

498491
int msi_domain_alloc_irqs_range_locked(struct device *dev, unsigned int domid,
499492
unsigned int first, unsigned int last);

kernel/irq/msi.c

Lines changed: 0 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,51 +1140,6 @@ int msi_domain_alloc_irqs_all_locked(struct device *dev, unsigned int domid, int
11401140
return msi_domain_alloc_locked(dev, &ctrl);
11411141
}
11421142

1143-
/**
1144-
* msi_domain_alloc_irqs_descs_locked - Allocate interrupts from a MSI interrupt domain
1145-
* @domain: The domain to allocate from
1146-
* @dev: Pointer to device struct of the device for which the interrupts
1147-
* are allocated
1148-
* @nvec: The number of interrupts to allocate
1149-
*
1150-
* Must be invoked from within a msi_lock_descs() / msi_unlock_descs()
1151-
* pair. Use this for MSI irqdomains which implement their own vector
1152-
* allocation/free.
1153-
*
1154-
* Return: %0 on success or an error code.
1155-
*/
1156-
int msi_domain_alloc_irqs_descs_locked(struct irq_domain *domain, struct device *dev,
1157-
int nvec)
1158-
{
1159-
struct msi_ctrl ctrl = {
1160-
.domid = MSI_DEFAULT_DOMAIN,
1161-
.first = 0,
1162-
.last = MSI_MAX_INDEX,
1163-
.nirqs = nvec,
1164-
};
1165-
1166-
return msi_domain_alloc_locked(dev, &ctrl);
1167-
}
1168-
1169-
/**
1170-
* msi_domain_alloc_irqs - Allocate interrupts from a MSI interrupt domain
1171-
* @domain: The domain to allocate from
1172-
* @dev: Pointer to device struct of the device for which the interrupts
1173-
* are allocated
1174-
* @nvec: The number of interrupts to allocate
1175-
*
1176-
* Return: %0 on success or an error code.
1177-
*/
1178-
int msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev, int nvec)
1179-
{
1180-
int ret;
1181-
1182-
msi_lock_descs(dev);
1183-
ret = msi_domain_alloc_irqs_descs_locked(domain, dev, nvec);
1184-
msi_unlock_descs(dev);
1185-
return ret;
1186-
}
1187-
11881143
static void __msi_domain_free_irqs(struct device *dev, struct irq_domain *domain,
11891144
struct msi_ctrl *ctrl)
11901145
{
@@ -1309,34 +1264,6 @@ void msi_domain_free_irqs_all(struct device *dev, unsigned int domid)
13091264
msi_unlock_descs(dev);
13101265
}
13111266

1312-
/**
1313-
* msi_domain_free_irqs_descs_locked - Free interrupts from a MSI interrupt @domain associated to @dev
1314-
* @domain: The domain to managing the interrupts
1315-
* @dev: Pointer to device struct of the device for which the interrupts
1316-
* are free
1317-
*
1318-
* Must be invoked from within a msi_lock_descs() / msi_unlock_descs()
1319-
* pair. Use this for MSI irqdomains which implement their own vector
1320-
* allocation.
1321-
*/
1322-
void msi_domain_free_irqs_descs_locked(struct irq_domain *domain, struct device *dev)
1323-
{
1324-
msi_domain_free_irqs_range_locked(dev, MSI_DEFAULT_DOMAIN, 0, MSI_MAX_INDEX);
1325-
}
1326-
1327-
/**
1328-
* msi_domain_free_irqs - Free interrupts from a MSI interrupt @domain associated to @dev
1329-
* @domain: The domain to managing the interrupts
1330-
* @dev: Pointer to device struct of the device for which the interrupts
1331-
* are free
1332-
*/
1333-
void msi_domain_free_irqs(struct irq_domain *domain, struct device *dev)
1334-
{
1335-
msi_lock_descs(dev);
1336-
msi_domain_free_irqs_descs_locked(domain, dev);
1337-
msi_unlock_descs(dev);
1338-
}
1339-
13401267
/**
13411268
* msi_get_domain_info - Get the MSI interrupt domain info for @domain
13421269
* @domain: The interrupt domain to retrieve data from

0 commit comments

Comments
 (0)