diff options
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/powernv/pci.c | 22 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/eeh.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/suspend.c | 6 | ||||
-rw-r--r-- | arch/powerpc/platforms/wsp/ics.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/wsp/wsp_pci.c | 8 |
5 files changed, 26 insertions, 16 deletions
diff --git a/arch/powerpc/platforms/powernv/pci.c b/arch/powerpc/platforms/powernv/pci.c index a70bc1e385eb..f92b9ef7340e 100644 --- a/arch/powerpc/platforms/powernv/pci.c +++ b/arch/powerpc/platforms/powernv/pci.c | |||
@@ -52,32 +52,38 @@ static int pnv_msi_check_device(struct pci_dev* pdev, int nvec, int type) | |||
52 | 52 | ||
53 | static unsigned int pnv_get_one_msi(struct pnv_phb *phb) | 53 | static unsigned int pnv_get_one_msi(struct pnv_phb *phb) |
54 | { | 54 | { |
55 | unsigned int id; | 55 | unsigned long flags; |
56 | unsigned int id, rc; | ||
57 | |||
58 | spin_lock_irqsave(&phb->lock, flags); | ||
56 | 59 | ||
57 | spin_lock(&phb->lock); | ||
58 | id = find_next_zero_bit(phb->msi_map, phb->msi_count, phb->msi_next); | 60 | id = find_next_zero_bit(phb->msi_map, phb->msi_count, phb->msi_next); |
59 | if (id >= phb->msi_count && phb->msi_next) | 61 | if (id >= phb->msi_count && phb->msi_next) |
60 | id = find_next_zero_bit(phb->msi_map, phb->msi_count, 0); | 62 | id = find_next_zero_bit(phb->msi_map, phb->msi_count, 0); |
61 | if (id >= phb->msi_count) { | 63 | if (id >= phb->msi_count) { |
62 | spin_unlock(&phb->lock); | 64 | rc = 0; |
63 | return 0; | 65 | goto out; |
64 | } | 66 | } |
65 | __set_bit(id, phb->msi_map); | 67 | __set_bit(id, phb->msi_map); |
66 | spin_unlock(&phb->lock); | 68 | rc = id + phb->msi_base; |
67 | return id + phb->msi_base; | 69 | out: |
70 | spin_unlock_irqrestore(&phb->lock, flags); | ||
71 | return rc; | ||
68 | } | 72 | } |
69 | 73 | ||
70 | static void pnv_put_msi(struct pnv_phb *phb, unsigned int hwirq) | 74 | static void pnv_put_msi(struct pnv_phb *phb, unsigned int hwirq) |
71 | { | 75 | { |
76 | unsigned long flags; | ||
72 | unsigned int id; | 77 | unsigned int id; |
73 | 78 | ||
74 | if (WARN_ON(hwirq < phb->msi_base || | 79 | if (WARN_ON(hwirq < phb->msi_base || |
75 | hwirq >= (phb->msi_base + phb->msi_count))) | 80 | hwirq >= (phb->msi_base + phb->msi_count))) |
76 | return; | 81 | return; |
77 | id = hwirq - phb->msi_base; | 82 | id = hwirq - phb->msi_base; |
78 | spin_lock(&phb->lock); | 83 | |
84 | spin_lock_irqsave(&phb->lock, flags); | ||
79 | __clear_bit(id, phb->msi_map); | 85 | __clear_bit(id, phb->msi_map); |
80 | spin_unlock(&phb->lock); | 86 | spin_unlock_irqrestore(&phb->lock, flags); |
81 | } | 87 | } |
82 | 88 | ||
83 | static int pnv_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type) | 89 | static int pnv_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type) |
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index 565869022e3d..c0b40af4ce4f 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c | |||
@@ -551,9 +551,9 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev) | |||
551 | printk (KERN_ERR "EEH: %d reads ignored for recovering device at " | 551 | printk (KERN_ERR "EEH: %d reads ignored for recovering device at " |
552 | "location=%s driver=%s pci addr=%s\n", | 552 | "location=%s driver=%s pci addr=%s\n", |
553 | pdn->eeh_check_count, location, | 553 | pdn->eeh_check_count, location, |
554 | dev->driver->name, eeh_pci_name(dev)); | 554 | eeh_driver_name(dev), eeh_pci_name(dev)); |
555 | printk (KERN_ERR "EEH: Might be infinite loop in %s driver\n", | 555 | printk (KERN_ERR "EEH: Might be infinite loop in %s driver\n", |
556 | dev->driver->name); | 556 | eeh_driver_name(dev)); |
557 | dump_stack(); | 557 | dump_stack(); |
558 | } | 558 | } |
559 | goto dn_unlock; | 559 | goto dn_unlock; |
diff --git a/arch/powerpc/platforms/pseries/suspend.c b/arch/powerpc/platforms/pseries/suspend.c index b84a8b2238dd..47226e04126d 100644 --- a/arch/powerpc/platforms/pseries/suspend.c +++ b/arch/powerpc/platforms/pseries/suspend.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <asm/machdep.h> | 24 | #include <asm/machdep.h> |
25 | #include <asm/mmu.h> | 25 | #include <asm/mmu.h> |
26 | #include <asm/rtas.h> | 26 | #include <asm/rtas.h> |
27 | #include <asm/topology.h> | ||
27 | 28 | ||
28 | static u64 stream_id; | 29 | static u64 stream_id; |
29 | static struct device suspend_dev; | 30 | static struct device suspend_dev; |
@@ -138,8 +139,11 @@ static ssize_t store_hibernate(struct device *dev, | |||
138 | ssleep(1); | 139 | ssleep(1); |
139 | } while (rc == -EAGAIN); | 140 | } while (rc == -EAGAIN); |
140 | 141 | ||
141 | if (!rc) | 142 | if (!rc) { |
143 | stop_topology_update(); | ||
142 | rc = pm_suspend(PM_SUSPEND_MEM); | 144 | rc = pm_suspend(PM_SUSPEND_MEM); |
145 | start_topology_update(); | ||
146 | } | ||
143 | 147 | ||
144 | stream_id = 0; | 148 | stream_id = 0; |
145 | 149 | ||
diff --git a/arch/powerpc/platforms/wsp/ics.c b/arch/powerpc/platforms/wsp/ics.c index 576874392543..97fe82ee8633 100644 --- a/arch/powerpc/platforms/wsp/ics.c +++ b/arch/powerpc/platforms/wsp/ics.c | |||
@@ -346,7 +346,7 @@ static int wsp_chip_set_affinity(struct irq_data *d, | |||
346 | * For the moment only implement delivery to all cpus or one cpu. | 346 | * For the moment only implement delivery to all cpus or one cpu. |
347 | * Get current irq_server for the given irq | 347 | * Get current irq_server for the given irq |
348 | */ | 348 | */ |
349 | ret = cache_hwirq_map(ics, d->irq, cpumask); | 349 | ret = cache_hwirq_map(ics, hw_irq, cpumask); |
350 | if (ret == -1) { | 350 | if (ret == -1) { |
351 | char cpulist[128]; | 351 | char cpulist[128]; |
352 | cpumask_scnprintf(cpulist, sizeof(cpulist), cpumask); | 352 | cpumask_scnprintf(cpulist, sizeof(cpulist), cpumask); |
diff --git a/arch/powerpc/platforms/wsp/wsp_pci.c b/arch/powerpc/platforms/wsp/wsp_pci.c index e0262cd0e2d3..d24b3acf858e 100644 --- a/arch/powerpc/platforms/wsp/wsp_pci.c +++ b/arch/powerpc/platforms/wsp/wsp_pci.c | |||
@@ -468,15 +468,15 @@ static void __init wsp_pcie_configure_hw(struct pci_controller *hose) | |||
468 | #define DUMP_REG(x) \ | 468 | #define DUMP_REG(x) \ |
469 | pr_debug("%-30s : 0x%016llx\n", #x, in_be64(hose->cfg_data + x)) | 469 | pr_debug("%-30s : 0x%016llx\n", #x, in_be64(hose->cfg_data + x)) |
470 | 470 | ||
471 | #ifdef CONFIG_WSP_DD1_WORKAROUND_BAD_PCIE_CLASS | 471 | /* |
472 | /* WSP DD1 has a bogus class code by default in the PCI-E | 472 | * Some WSP variants has a bogus class code by default in the PCI-E |
473 | * root complex's built-in P2P bridge */ | 473 | * root complex's built-in P2P bridge |
474 | */ | ||
474 | val = in_be64(hose->cfg_data + PCIE_REG_SYS_CFG1); | 475 | val = in_be64(hose->cfg_data + PCIE_REG_SYS_CFG1); |
475 | pr_debug("PCI-E SYS_CFG1 : 0x%llx\n", val); | 476 | pr_debug("PCI-E SYS_CFG1 : 0x%llx\n", val); |
476 | out_be64(hose->cfg_data + PCIE_REG_SYS_CFG1, | 477 | out_be64(hose->cfg_data + PCIE_REG_SYS_CFG1, |
477 | (val & ~PCIE_REG_SYS_CFG1_CLASS_CODE) | (PCI_CLASS_BRIDGE_PCI << 8)); | 478 | (val & ~PCIE_REG_SYS_CFG1_CLASS_CODE) | (PCI_CLASS_BRIDGE_PCI << 8)); |
478 | pr_debug("PCI-E SYS_CFG1 : 0x%llx\n", in_be64(hose->cfg_data + PCIE_REG_SYS_CFG1)); | 479 | pr_debug("PCI-E SYS_CFG1 : 0x%llx\n", in_be64(hose->cfg_data + PCIE_REG_SYS_CFG1)); |
479 | #endif /* CONFIG_WSP_DD1_WORKAROUND_BAD_PCIE_CLASS */ | ||
480 | 480 | ||
481 | #ifdef CONFIG_WSP_DD1_WORKAROUND_DD1_TCE_BUGS | 481 | #ifdef CONFIG_WSP_DD1_WORKAROUND_DD1_TCE_BUGS |
482 | /* XXX Disable TCE caching, it doesn't work on DD1 */ | 482 | /* XXX Disable TCE caching, it doesn't work on DD1 */ |