Skip to content

Commit 14fd06c

Browse files
committed
irqchip: Convert all platform MSI users to the new API
Switch all the users of the platform MSI domain over to invoke the new interfaces which branch to the original platform MSI functions when the irqdomain associated to the caller device does not yet provide MSI parent functionality. No functional change. Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Anup Patel <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent c88f911 commit 14fd06c

File tree

6 files changed

+20
-19
lines changed

6 files changed

+20
-19
lines changed

drivers/dma/mv_xor_v2.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -747,8 +747,8 @@ static int mv_xor_v2_probe(struct platform_device *pdev)
747747
if (IS_ERR(xor_dev->clk))
748748
return PTR_ERR(xor_dev->clk);
749749

750-
ret = platform_msi_domain_alloc_irqs(&pdev->dev, 1,
751-
mv_xor_v2_set_msi_msg);
750+
ret = platform_device_msi_init_and_alloc_irqs(&pdev->dev, 1,
751+
mv_xor_v2_set_msi_msg);
752752
if (ret)
753753
return ret;
754754

@@ -851,7 +851,7 @@ static int mv_xor_v2_probe(struct platform_device *pdev)
851851
xor_dev->desc_size * MV_XOR_V2_DESC_NUM,
852852
xor_dev->hw_desq_virt, xor_dev->hw_desq);
853853
free_msi_irqs:
854-
platform_msi_domain_free_irqs(&pdev->dev);
854+
platform_device_msi_free_irqs_all(&pdev->dev);
855855
return ret;
856856
}
857857

@@ -867,7 +867,7 @@ static void mv_xor_v2_remove(struct platform_device *pdev)
867867

868868
devm_free_irq(&pdev->dev, xor_dev->irq, xor_dev);
869869

870-
platform_msi_domain_free_irqs(&pdev->dev);
870+
platform_device_msi_free_irqs_all(&pdev->dev);
871871

872872
tasklet_kill(&xor_dev->irq_tasklet);
873873
}

drivers/dma/qcom/hidma.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ static void hidma_free_msis(struct hidma_dev *dmadev)
696696
devm_free_irq(dev, virq, &dmadev->lldev);
697697
}
698698

699-
platform_msi_domain_free_irqs(dev);
699+
platform_device_msi_free_irqs_all(dev);
700700
#endif
701701
}
702702

@@ -706,8 +706,8 @@ static int hidma_request_msi(struct hidma_dev *dmadev,
706706
#ifdef CONFIG_GENERIC_MSI_IRQ
707707
int rc, i, virq;
708708

709-
rc = platform_msi_domain_alloc_irqs(&pdev->dev, HIDMA_MSI_INTS,
710-
hidma_write_msi_msg);
709+
rc = platform_device_msi_init_and_alloc_irqs(&pdev->dev, HIDMA_MSI_INTS,
710+
hidma_write_msi_msg);
711711
if (rc)
712712
return rc;
713713

drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3125,7 +3125,8 @@ static int arm_smmu_update_gbpa(struct arm_smmu_device *smmu, u32 set, u32 clr)
31253125
static void arm_smmu_free_msis(void *data)
31263126
{
31273127
struct device *dev = data;
3128-
platform_msi_domain_free_irqs(dev);
3128+
3129+
platform_device_msi_free_irqs_all(dev);
31293130
}
31303131

31313132
static void arm_smmu_write_msi_msg(struct msi_desc *desc, struct msi_msg *msg)
@@ -3166,7 +3167,7 @@ static void arm_smmu_setup_msis(struct arm_smmu_device *smmu)
31663167
}
31673168

31683169
/* Allocate MSIs for evtq, gerror and priq. Ignore cmdq */
3169-
ret = platform_msi_domain_alloc_irqs(dev, nvec, arm_smmu_write_msi_msg);
3170+
ret = platform_device_msi_init_and_alloc_irqs(dev, nvec, arm_smmu_write_msi_msg);
31703171
if (ret) {
31713172
dev_warn(dev, "failed to allocate MSIs - falling back to wired irqs\n");
31723173
return;

drivers/mailbox/bcm-flexrm-mailbox.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,8 +1587,8 @@ static int flexrm_mbox_probe(struct platform_device *pdev)
15871587
}
15881588

15891589
/* Allocate platform MSIs for each ring */
1590-
ret = platform_msi_domain_alloc_irqs(dev, mbox->num_rings,
1591-
flexrm_mbox_msi_write);
1590+
ret = platform_device_msi_init_and_alloc_irqs(dev, mbox->num_rings,
1591+
flexrm_mbox_msi_write);
15921592
if (ret)
15931593
goto fail_destroy_cmpl_pool;
15941594

@@ -1641,7 +1641,7 @@ static int flexrm_mbox_probe(struct platform_device *pdev)
16411641

16421642
fail_free_debugfs_root:
16431643
debugfs_remove_recursive(mbox->root);
1644-
platform_msi_domain_free_irqs(dev);
1644+
platform_device_msi_free_irqs_all(dev);
16451645
fail_destroy_cmpl_pool:
16461646
dma_pool_destroy(mbox->cmpl_pool);
16471647
fail_destroy_bd_pool:
@@ -1657,7 +1657,7 @@ static void flexrm_mbox_remove(struct platform_device *pdev)
16571657

16581658
debugfs_remove_recursive(mbox->root);
16591659

1660-
platform_msi_domain_free_irqs(dev);
1660+
platform_device_msi_free_irqs_all(dev);
16611661

16621662
dma_pool_destroy(mbox->cmpl_pool);
16631663
dma_pool_destroy(mbox->bd_pool);

drivers/perf/arm_smmuv3_pmu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ static void smmu_pmu_free_msis(void *data)
716716
{
717717
struct device *dev = data;
718718

719-
platform_msi_domain_free_irqs(dev);
719+
platform_device_msi_free_irqs_all(dev);
720720
}
721721

722722
static void smmu_pmu_write_msi_msg(struct msi_desc *desc, struct msi_msg *msg)
@@ -746,7 +746,7 @@ static void smmu_pmu_setup_msi(struct smmu_pmu *pmu)
746746
if (!(readl(pmu->reg_base + SMMU_PMCG_CFGR) & SMMU_PMCG_CFGR_MSI))
747747
return;
748748

749-
ret = platform_msi_domain_alloc_irqs(dev, 1, smmu_pmu_write_msi_msg);
749+
ret = platform_device_msi_init_and_alloc_irqs(dev, 1, smmu_pmu_write_msi_msg);
750750
if (ret) {
751751
dev_warn(dev, "failed to allocate MSIs\n");
752752
return;

drivers/ufs/host/ufs-qcom.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1712,8 +1712,8 @@ static int ufs_qcom_config_esi(struct ufs_hba *hba)
17121712
* 2. Poll queues do not need ESI.
17131713
*/
17141714
nr_irqs = hba->nr_hw_queues - hba->nr_queues[HCTX_TYPE_POLL];
1715-
ret = platform_msi_domain_alloc_irqs(hba->dev, nr_irqs,
1716-
ufs_qcom_write_msi_msg);
1715+
ret = platform_device_msi_init_and_alloc_irqs(hba->dev, nr_irqs,
1716+
ufs_qcom_write_msi_msg);
17171717
if (ret) {
17181718
dev_err(hba->dev, "Failed to request Platform MSI %d\n", ret);
17191719
return ret;
@@ -1742,7 +1742,7 @@ static int ufs_qcom_config_esi(struct ufs_hba *hba)
17421742
devm_free_irq(hba->dev, desc->irq, hba);
17431743
}
17441744
msi_unlock_descs(hba->dev);
1745-
platform_msi_domain_free_irqs(hba->dev);
1745+
platform_device_msi_free_irqs_all(hba->dev);
17461746
} else {
17471747
if (host->hw_ver.major == 6 && host->hw_ver.minor == 0 &&
17481748
host->hw_ver.step == 0)
@@ -1818,7 +1818,7 @@ static void ufs_qcom_remove(struct platform_device *pdev)
18181818

18191819
pm_runtime_get_sync(&(pdev)->dev);
18201820
ufshcd_remove(hba);
1821-
platform_msi_domain_free_irqs(hba->dev);
1821+
platform_device_msi_free_irqs_all(hba->dev);
18221822
}
18231823

18241824
static const struct of_device_id ufs_qcom_of_match[] __maybe_unused = {

0 commit comments

Comments
 (0)