Merge branch 'remotes/lorenzo/pci/iproc'

- Set affinity mask on MSI interrupts (Mark Tomlinson)

- Simplify by using module_bcma_driver (Liu Shixin)

- Fix 'using integer as NULL pointer' warning (Krzysztof Wilczyński)

* remotes/lorenzo/pci/iproc:
  PCI: iproc: Fix using plain integer as NULL pointer in iproc_pcie_pltfm_probe
  PCI: iproc: Use module_bcma_driver to simplify the code
  PCI: iproc: Set affinity mask on MSI interrupts
This commit is contained in:
Bjorn Helgaas 2020-10-21 09:58:40 -05:00
commit 7ba381c449
3 changed files with 11 additions and 17 deletions

View File

@ -94,18 +94,7 @@ static struct bcma_driver iproc_pcie_bcma_driver = {
.probe = iproc_pcie_bcma_probe,
.remove = iproc_pcie_bcma_remove,
};
static int __init iproc_pcie_bcma_init(void)
{
return bcma_driver_register(&iproc_pcie_bcma_driver);
}
module_init(iproc_pcie_bcma_init);
static void __exit iproc_pcie_bcma_exit(void)
{
bcma_driver_unregister(&iproc_pcie_bcma_driver);
}
module_exit(iproc_pcie_bcma_exit);
module_bcma_driver(iproc_pcie_bcma_driver);
MODULE_AUTHOR("Hauke Mehrtens");
MODULE_DESCRIPTION("Broadcom iProc PCIe BCMA driver");

View File

@ -209,15 +209,20 @@ static int iproc_msi_irq_set_affinity(struct irq_data *data,
struct iproc_msi *msi = irq_data_get_irq_chip_data(data);
int target_cpu = cpumask_first(mask);
int curr_cpu;
int ret;
curr_cpu = hwirq_to_cpu(msi, data->hwirq);
if (curr_cpu == target_cpu)
return IRQ_SET_MASK_OK_DONE;
ret = IRQ_SET_MASK_OK_DONE;
else {
/* steer MSI to the target CPU */
data->hwirq = hwirq_to_canonical_hwirq(msi, data->hwirq) + target_cpu;
ret = IRQ_SET_MASK_OK;
}
/* steer MSI to the target CPU */
data->hwirq = hwirq_to_canonical_hwirq(msi, data->hwirq) + target_cpu;
irq_data_update_effective_affinity(data, cpumask_of(target_cpu));
return IRQ_SET_MASK_OK;
return ret;
}
static void iproc_msi_irq_compose_msi_msg(struct irq_data *data,

View File

@ -99,7 +99,7 @@ static int iproc_pcie_pltfm_probe(struct platform_device *pdev)
switch (pcie->type) {
case IPROC_PCIE_PAXC:
case IPROC_PCIE_PAXC_V2:
pcie->map_irq = 0;
pcie->map_irq = NULL;
break;
default:
break;