diff options
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/85xx/p1022_ds.c | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/powernv/pci-ioda.c | 43 | ||||
-rw-r--r-- | arch/powerpc/platforms/powernv/pci.c | 22 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/Kconfig | 2 | ||||
-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/smp.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/wsp/wsp_pci.c | 8 |
9 files changed, 56 insertions, 34 deletions
diff --git a/arch/powerpc/platforms/85xx/p1022_ds.c b/arch/powerpc/platforms/85xx/p1022_ds.c index bb3d84f4046f..b0984ada3f83 100644 --- a/arch/powerpc/platforms/85xx/p1022_ds.c +++ b/arch/powerpc/platforms/85xx/p1022_ds.c | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #include <sysdev/fsl_soc.h> | 26 | #include <sysdev/fsl_soc.h> |
27 | #include <sysdev/fsl_pci.h> | 27 | #include <sysdev/fsl_pci.h> |
28 | #include <asm/udbg.h> | ||
28 | #include <asm/fsl_guts.h> | 29 | #include <asm/fsl_guts.h> |
29 | #include "smp.h" | 30 | #include "smp.h" |
30 | 31 | ||
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index f31162cfdaa9..5e155dfc4320 100644 --- a/arch/powerpc/platforms/powernv/pci-ioda.c +++ b/arch/powerpc/platforms/powernv/pci-ioda.c | |||
@@ -204,11 +204,10 @@ static void __devinit pnv_ioda_offset_bus(struct pci_bus *bus, | |||
204 | pr_devel(" -> OBR %s [%x] +%016llx\n", | 204 | pr_devel(" -> OBR %s [%x] +%016llx\n", |
205 | bus->self ? pci_name(bus->self) : "root", flags, offset); | 205 | bus->self ? pci_name(bus->self) : "root", flags, offset); |
206 | 206 | ||
207 | for (i = 0; i < 2; i++) { | 207 | pci_bus_for_each_resource(bus, r, i) { |
208 | r = bus->resource[i]; | ||
209 | if (r && (r->flags & flags)) { | 208 | if (r && (r->flags & flags)) { |
210 | bus->resource[i]->start += offset; | 209 | r->start += offset; |
211 | bus->resource[i]->end += offset; | 210 | r->end += offset; |
212 | } | 211 | } |
213 | } | 212 | } |
214 | list_for_each_entry(dev, &bus->devices, bus_list) | 213 | list_for_each_entry(dev, &bus->devices, bus_list) |
@@ -288,12 +287,17 @@ static void __devinit pnv_ioda_calc_bus(struct pci_bus *bus, unsigned int flags, | |||
288 | * assignment algorithm is going to be uber-trivial for now, we | 287 | * assignment algorithm is going to be uber-trivial for now, we |
289 | * can try to be smarter later at filling out holes. | 288 | * can try to be smarter later at filling out holes. |
290 | */ | 289 | */ |
291 | start = bus->self ? 0 : bus->resource[bres]->start; | 290 | if (bus->self) { |
292 | 291 | /* No offset for downstream bridges */ | |
293 | /* Don't hand out IO 0 */ | 292 | start = 0; |
294 | if ((flags & IORESOURCE_IO) && !bus->self) | 293 | } else { |
295 | start += 0x1000; | 294 | /* Offset from the root */ |
296 | 295 | if (flags & IORESOURCE_IO) | |
296 | /* Don't hand out IO 0 */ | ||
297 | start = hose->io_resource.start + 0x1000; | ||
298 | else | ||
299 | start = hose->mem_resources[0].start; | ||
300 | } | ||
297 | while(!list_empty(&head)) { | 301 | while(!list_empty(&head)) { |
298 | w = list_first_entry(&head, struct resource_wrap, link); | 302 | w = list_first_entry(&head, struct resource_wrap, link); |
299 | list_del(&w->link); | 303 | list_del(&w->link); |
@@ -321,13 +325,20 @@ static void __devinit pnv_ioda_calc_bus(struct pci_bus *bus, unsigned int flags, | |||
321 | empty: | 325 | empty: |
322 | /* Only setup P2P's, not the PHB itself */ | 326 | /* Only setup P2P's, not the PHB itself */ |
323 | if (bus->self) { | 327 | if (bus->self) { |
324 | WARN_ON(bus->resource[bres] == NULL); | 328 | struct resource *res = bus->resource[bres]; |
325 | bus->resource[bres]->start = 0; | 329 | |
326 | bus->resource[bres]->flags = (*size) ? flags : 0; | 330 | if (WARN_ON(res == NULL)) |
327 | bus->resource[bres]->end = (*size) ? (*size - 1) : 0; | 331 | return; |
328 | 332 | ||
329 | /* Clear prefetch bus resources for now */ | 333 | /* |
330 | bus->resource[2]->flags = 0; | 334 | * FIXME: We should probably export and call |
335 | * pci_bridge_check_ranges() to properly re-initialize | ||
336 | * the PCI portion of the flags here, and to detect | ||
337 | * what the bridge actually supports. | ||
338 | */ | ||
339 | res->start = 0; | ||
340 | res->flags = (*size) ? flags : 0; | ||
341 | res->end = (*size) ? (*size - 1) : 0; | ||
331 | } | 342 | } |
332 | 343 | ||
333 | pr_devel("<- CBR %s [%x] *size=%016llx *align=%016llx\n", | 344 | pr_devel("<- CBR %s [%x] *size=%016llx *align=%016llx\n", |
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/Kconfig b/arch/powerpc/platforms/pseries/Kconfig index ae7b6d41fed3..31f22c1f657d 100644 --- a/arch/powerpc/platforms/pseries/Kconfig +++ b/arch/powerpc/platforms/pseries/Kconfig | |||
@@ -122,7 +122,7 @@ config DTL | |||
122 | Say N if you are unsure. | 122 | Say N if you are unsure. |
123 | 123 | ||
124 | config PSERIES_IDLE | 124 | config PSERIES_IDLE |
125 | tristate "Cpuidle driver for pSeries platforms" | 125 | bool "Cpuidle driver for pSeries platforms" |
126 | depends on CPU_IDLE | 126 | depends on CPU_IDLE |
127 | depends on PPC_PSERIES | 127 | depends on PPC_PSERIES |
128 | default y | 128 | default y |
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/smp.c b/arch/powerpc/platforms/wsp/smp.c index 71bd105f3863..0ba103ae83a5 100644 --- a/arch/powerpc/platforms/wsp/smp.c +++ b/arch/powerpc/platforms/wsp/smp.c | |||
@@ -71,7 +71,7 @@ int __devinit smp_a2_kick_cpu(int nr) | |||
71 | 71 | ||
72 | static int __init smp_a2_probe(void) | 72 | static int __init smp_a2_probe(void) |
73 | { | 73 | { |
74 | return cpus_weight(cpu_possible_map); | 74 | return num_possible_cpus(); |
75 | } | 75 | } |
76 | 76 | ||
77 | static struct smp_ops_t a2_smp_ops = { | 77 | static struct smp_ops_t a2_smp_ops = { |
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 */ |