Code Review
/
kvmfornfv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git]
/
kernel
/
arch
/
powerpc
/
sysdev
/
ppc4xx_hsta_msi.c
diff --git
a/kernel/arch/powerpc/sysdev/ppc4xx_hsta_msi.c
b/kernel/arch/powerpc/sysdev/ppc4xx_hsta_msi.c
index
f366d2d
..
52a93dc
100644
(file)
--- a/
kernel/arch/powerpc/sysdev/ppc4xx_hsta_msi.c
+++ b/
kernel/arch/powerpc/sysdev/ppc4xx_hsta_msi.c
@@
-18,6
+18,7
@@
#include <linux/pci.h>
#include <linux/semaphore.h>
#include <asm/msi_bitmap.h>
#include <linux/pci.h>
#include <linux/semaphore.h>
#include <asm/msi_bitmap.h>
+#include <asm/ppc-pci.h>
struct ppc4xx_hsta_msi {
struct device *dev;
struct ppc4xx_hsta_msi {
struct device *dev;
@@
-50,7
+51,7
@@
static int hsta_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
return -EINVAL;
}
return -EINVAL;
}
-
list_for_each_entry(entry, &dev->msi_list, list
) {
+
for_each_pci_msi_entry(entry, dev
) {
irq = msi_bitmap_alloc_hwirqs(&ppc4xx_hsta_msi.bmp, 1);
if (irq < 0) {
pr_debug("%s: Failed to allocate msi interrupt\n",
irq = msi_bitmap_alloc_hwirqs(&ppc4xx_hsta_msi.bmp, 1);
if (irq < 0) {
pr_debug("%s: Failed to allocate msi interrupt\n",
@@
-108,7
+109,7
@@
static void hsta_teardown_msi_irqs(struct pci_dev *dev)
struct msi_desc *entry;
int irq;
struct msi_desc *entry;
int irq;
-
list_for_each_entry(entry, &dev->msi_list, list
) {
+
for_each_pci_msi_entry(entry, dev
) {
if (entry->irq == NO_IRQ)
continue;
if (entry->irq == NO_IRQ)
continue;
@@
-128,9
+129,10
@@
static int hsta_msi_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct resource *mem;
int irq, ret, irq_count;
struct device *dev = &pdev->dev;
struct resource *mem;
int irq, ret, irq_count;
+ struct pci_controller *phb;
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (
IS_ERR(mem)
) {
+ if (
!mem
) {
dev_err(dev, "Unable to get mmio space\n");
return -EINVAL;
}
dev_err(dev, "Unable to get mmio space\n");
return -EINVAL;
}
@@
-155,7
+157,7
@@
static int hsta_msi_probe(struct platform_device *pdev)
goto out;
ppc4xx_hsta_msi.irq_map = kmalloc(sizeof(int) * irq_count, GFP_KERNEL);
goto out;
ppc4xx_hsta_msi.irq_map = kmalloc(sizeof(int) * irq_count, GFP_KERNEL);
- if (
IS_ERR(ppc4xx_hsta_msi.irq_map)
) {
+ if (
!ppc4xx_hsta_msi.irq_map
) {
ret = -ENOMEM;
goto out1;
}
ret = -ENOMEM;
goto out1;
}
@@
-171,8
+173,10
@@
static int hsta_msi_probe(struct platform_device *pdev)
}
}
}
}
- ppc_md.setup_msi_irqs = hsta_setup_msi_irqs;
- ppc_md.teardown_msi_irqs = hsta_teardown_msi_irqs;
+ list_for_each_entry(phb, &hose_list, list_node) {
+ phb->controller_ops.setup_msi_irqs = hsta_setup_msi_irqs;
+ phb->controller_ops.teardown_msi_irqs = hsta_teardown_msi_irqs;
+ }
return 0;
out2:
return 0;
out2: