diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-16 14:53:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-16 14:53:32 -0400 |
commit | d19d5efd8c8840aa4f38a6dfbfe500d8cc27de46 (patch) | |
tree | 2e2f4f57de790c7de2ccd6d1afbec8695b2c7a46 /drivers/macintosh | |
parent | 34c9a0ffc75ad25b6a60f61e27c4a4b1189b8085 (diff) | |
parent | 2fe0753d49402aee325cc39c476b46fd51a8afec (diff) |
Merge tag 'powerpc-4.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux
Pull powerpc updates from Michael Ellerman:
- Numerous minor fixes, cleanups etc.
- More EEH work from Gavin to remove its dependency on device_nodes.
- Memory hotplug implemented entirely in the kernel from Nathan
Fontenot.
- Removal of redundant CONFIG_PPC_OF by Kevin Hao.
- Rewrite of VPHN parsing logic & tests from Greg Kurz.
- A fix from Nish Aravamudan to reduce memory usage by clamping
nodes_possible_map.
- Support for pstore on powernv from Hari Bathini.
- Removal of old powerpc specific byte swap routines by David Gibson.
- Fix from Vasant Hegde to prevent the flash driver telling you it was
flashing your firmware when it wasn't.
- Patch from Ben Herrenschmidt to add an OPAL heartbeat driver.
- Fix for an oops causing get/put_cpu_var() imbalance in perf by Jan
Stancek.
- Some fixes for migration from Tyrel Datwyler.
- A new syscall to switch the cpu endian by Michael Ellerman.
- Large series from Wei Yang to implement SRIOV, reviewed and acked by
Bjorn.
- A fix for the OPAL sensor driver from Cédric Le Goater.
- Fixes to get STRICT_MM_TYPECHECKS building again by Michael Ellerman.
- Large series from Daniel Axtens to make our PCI hooks per PHB rather
than per machine.
- Small patch from Sam Bobroff to explicitly abort non-suspended
transactions on syscalls, plus a test to exercise it.
- Numerous reworks and fixes for the 24x7 PMU from Sukadev Bhattiprolu.
- Small patch to enable the hard lockup detector from Anton Blanchard.
- Fix from Dave Olson for missing L2 cache information on some CPUs.
- Some fixes from Michael Ellerman to get Cell machines booting again.
- Freescale updates from Scott: Highlights include BMan device tree
nodes, an MSI erratum workaround, a couple minor performance
improvements, config updates, and misc fixes/cleanup.
* tag 'powerpc-4.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux: (196 commits)
powerpc/powermac: Fix build error seen with powermac smp builds
powerpc/pseries: Fix compile of memory hotplug without CONFIG_MEMORY_HOTREMOVE
powerpc: Remove PPC32 code from pseries specific find_and_init_phbs()
powerpc/cell: Fix iommu breakage caused by controller_ops change
powerpc/eeh: Fix crash in eeh_add_device_early() on Cell
powerpc/perf: Cap 64bit userspace backtraces to PERF_MAX_STACK_DEPTH
powerpc/perf/hv-24x7: Fail 24x7 initcall if create_events_from_catalog() fails
powerpc/pseries: Correct memory hotplug locking
powerpc: Fix missing L2 cache size in /sys/devices/system/cpu
powerpc: Add ppc64 hard lockup detector support
oprofile: Disable oprofile NMI timer on ppc64
powerpc/perf/hv-24x7: Add missing put_cpu_var()
powerpc/perf/hv-24x7: Break up single_24x7_request
powerpc/perf/hv-24x7: Define update_event_count()
powerpc/perf/hv-24x7: Whitespace cleanup
powerpc/perf/hv-24x7: Define add_event_to_24x7_request()
powerpc/perf/hv-24x7: Rename hv_24x7_event_update
powerpc/perf/hv-24x7: Move debug prints to separate function
powerpc/perf/hv-24x7: Drop event_24x7_request()
powerpc/perf/hv-24x7: Use pr_devel() to log message
...
Conflicts:
tools/testing/selftests/powerpc/Makefile
tools/testing/selftests/powerpc/tm/Makefile
Diffstat (limited to 'drivers/macintosh')
-rw-r--r-- | drivers/macintosh/rack-meter.c | 30 | ||||
-rw-r--r-- | drivers/macintosh/smu.c | 3 | ||||
-rw-r--r-- | drivers/macintosh/via-pmu.c | 25 |
3 files changed, 30 insertions, 28 deletions
diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c index 4192901cab40..048901a1111a 100644 --- a/drivers/macintosh/rack-meter.c +++ b/drivers/macintosh/rack-meter.c | |||
@@ -182,31 +182,31 @@ static void rackmeter_setup_dbdma(struct rackmeter *rm) | |||
182 | 182 | ||
183 | /* Prepare 4 dbdma commands for the 2 buffers */ | 183 | /* Prepare 4 dbdma commands for the 2 buffers */ |
184 | memset(cmd, 0, 4 * sizeof(struct dbdma_cmd)); | 184 | memset(cmd, 0, 4 * sizeof(struct dbdma_cmd)); |
185 | st_le16(&cmd->req_count, 4); | 185 | cmd->req_count = cpu_to_le16(4); |
186 | st_le16(&cmd->command, STORE_WORD | INTR_ALWAYS | KEY_SYSTEM); | 186 | cmd->command = cpu_to_le16(STORE_WORD | INTR_ALWAYS | KEY_SYSTEM); |
187 | st_le32(&cmd->phy_addr, rm->dma_buf_p + | 187 | cmd->phy_addr = cpu_to_le32(rm->dma_buf_p + |
188 | offsetof(struct rackmeter_dma, mark)); | 188 | offsetof(struct rackmeter_dma, mark)); |
189 | st_le32(&cmd->cmd_dep, 0x02000000); | 189 | cmd->cmd_dep = cpu_to_le32(0x02000000); |
190 | cmd++; | 190 | cmd++; |
191 | 191 | ||
192 | st_le16(&cmd->req_count, SAMPLE_COUNT * 4); | 192 | cmd->req_count = cpu_to_le16(SAMPLE_COUNT * 4); |
193 | st_le16(&cmd->command, OUTPUT_MORE); | 193 | cmd->command = cpu_to_le16(OUTPUT_MORE); |
194 | st_le32(&cmd->phy_addr, rm->dma_buf_p + | 194 | cmd->phy_addr = cpu_to_le32(rm->dma_buf_p + |
195 | offsetof(struct rackmeter_dma, buf1)); | 195 | offsetof(struct rackmeter_dma, buf1)); |
196 | cmd++; | 196 | cmd++; |
197 | 197 | ||
198 | st_le16(&cmd->req_count, 4); | 198 | cmd->req_count = cpu_to_le16(4); |
199 | st_le16(&cmd->command, STORE_WORD | INTR_ALWAYS | KEY_SYSTEM); | 199 | cmd->command = cpu_to_le16(STORE_WORD | INTR_ALWAYS | KEY_SYSTEM); |
200 | st_le32(&cmd->phy_addr, rm->dma_buf_p + | 200 | cmd->phy_addr = cpu_to_le32(rm->dma_buf_p + |
201 | offsetof(struct rackmeter_dma, mark)); | 201 | offsetof(struct rackmeter_dma, mark)); |
202 | st_le32(&cmd->cmd_dep, 0x01000000); | 202 | cmd->cmd_dep = cpu_to_le32(0x01000000); |
203 | cmd++; | 203 | cmd++; |
204 | 204 | ||
205 | st_le16(&cmd->req_count, SAMPLE_COUNT * 4); | 205 | cmd->req_count = cpu_to_le16(SAMPLE_COUNT * 4); |
206 | st_le16(&cmd->command, OUTPUT_MORE | BR_ALWAYS); | 206 | cmd->command = cpu_to_le16(OUTPUT_MORE | BR_ALWAYS); |
207 | st_le32(&cmd->phy_addr, rm->dma_buf_p + | 207 | cmd->phy_addr = cpu_to_le32(rm->dma_buf_p + |
208 | offsetof(struct rackmeter_dma, buf2)); | 208 | offsetof(struct rackmeter_dma, buf2)); |
209 | st_le32(&cmd->cmd_dep, rm->dma_buf_p); | 209 | cmd->cmd_dep = cpu_to_le32(rm->dma_buf_p); |
210 | 210 | ||
211 | rackmeter_do_pause(rm, 0); | 211 | rackmeter_do_pause(rm, 0); |
212 | } | 212 | } |
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c index 10ae69bcbbd2..d531f804455d 100644 --- a/drivers/macintosh/smu.c +++ b/drivers/macintosh/smu.c | |||
@@ -557,8 +557,7 @@ int __init smu_init (void) | |||
557 | return 0; | 557 | return 0; |
558 | 558 | ||
559 | fail_msg_node: | 559 | fail_msg_node: |
560 | if (smu->msg_node) | 560 | of_node_put(smu->msg_node); |
561 | of_node_put(smu->msg_node); | ||
562 | fail_db_node: | 561 | fail_db_node: |
563 | of_node_put(smu->db_node); | 562 | of_node_put(smu->db_node); |
564 | fail_bootmem: | 563 | fail_bootmem: |
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index dee88e59f0d3..f9512bfa6c3c 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c | |||
@@ -329,10 +329,11 @@ int __init find_via_pmu(void) | |||
329 | gaddr = of_translate_address(gpiop, reg); | 329 | gaddr = of_translate_address(gpiop, reg); |
330 | if (gaddr != OF_BAD_ADDR) | 330 | if (gaddr != OF_BAD_ADDR) |
331 | gpio_reg = ioremap(gaddr, 0x10); | 331 | gpio_reg = ioremap(gaddr, 0x10); |
332 | of_node_put(gpiop); | ||
332 | } | 333 | } |
333 | if (gpio_reg == NULL) { | 334 | if (gpio_reg == NULL) { |
334 | printk(KERN_ERR "via-pmu: Can't find GPIO reg !\n"); | 335 | printk(KERN_ERR "via-pmu: Can't find GPIO reg !\n"); |
335 | goto fail_gpio; | 336 | goto fail; |
336 | } | 337 | } |
337 | } else | 338 | } else |
338 | pmu_kind = PMU_UNKNOWN; | 339 | pmu_kind = PMU_UNKNOWN; |
@@ -340,7 +341,7 @@ int __init find_via_pmu(void) | |||
340 | via = ioremap(taddr, 0x2000); | 341 | via = ioremap(taddr, 0x2000); |
341 | if (via == NULL) { | 342 | if (via == NULL) { |
342 | printk(KERN_ERR "via-pmu: Can't map address !\n"); | 343 | printk(KERN_ERR "via-pmu: Can't map address !\n"); |
343 | goto fail; | 344 | goto fail_via_remap; |
344 | } | 345 | } |
345 | 346 | ||
346 | out_8(&via[IER], IER_CLR | 0x7f); /* disable all intrs */ | 347 | out_8(&via[IER], IER_CLR | 0x7f); /* disable all intrs */ |
@@ -348,10 +349,8 @@ int __init find_via_pmu(void) | |||
348 | 349 | ||
349 | pmu_state = idle; | 350 | pmu_state = idle; |
350 | 351 | ||
351 | if (!init_pmu()) { | 352 | if (!init_pmu()) |
352 | via = NULL; | 353 | goto fail_init; |
353 | return 0; | ||
354 | } | ||
355 | 354 | ||
356 | printk(KERN_INFO "PMU driver v%d initialized for %s, firmware: %02x\n", | 355 | printk(KERN_INFO "PMU driver v%d initialized for %s, firmware: %02x\n", |
357 | PMU_DRIVER_VERSION, pbook_type[pmu_kind], pmu_version); | 356 | PMU_DRIVER_VERSION, pbook_type[pmu_kind], pmu_version); |
@@ -359,11 +358,15 @@ int __init find_via_pmu(void) | |||
359 | sys_ctrler = SYS_CTRLER_PMU; | 358 | sys_ctrler = SYS_CTRLER_PMU; |
360 | 359 | ||
361 | return 1; | 360 | return 1; |
362 | fail: | 361 | |
363 | of_node_put(vias); | 362 | fail_init: |
363 | iounmap(via); | ||
364 | via = NULL; | ||
365 | fail_via_remap: | ||
364 | iounmap(gpio_reg); | 366 | iounmap(gpio_reg); |
365 | gpio_reg = NULL; | 367 | gpio_reg = NULL; |
366 | fail_gpio: | 368 | fail: |
369 | of_node_put(vias); | ||
367 | vias = NULL; | 370 | vias = NULL; |
368 | return 0; | 371 | return 0; |
369 | } | 372 | } |
@@ -2109,7 +2112,7 @@ pmu_read(struct file *file, char __user *buf, | |||
2109 | 2112 | ||
2110 | spin_lock_irqsave(&pp->lock, flags); | 2113 | spin_lock_irqsave(&pp->lock, flags); |
2111 | add_wait_queue(&pp->wait, &wait); | 2114 | add_wait_queue(&pp->wait, &wait); |
2112 | current->state = TASK_INTERRUPTIBLE; | 2115 | set_current_state(TASK_INTERRUPTIBLE); |
2113 | 2116 | ||
2114 | for (;;) { | 2117 | for (;;) { |
2115 | ret = -EAGAIN; | 2118 | ret = -EAGAIN; |
@@ -2138,7 +2141,7 @@ pmu_read(struct file *file, char __user *buf, | |||
2138 | schedule(); | 2141 | schedule(); |
2139 | spin_lock_irqsave(&pp->lock, flags); | 2142 | spin_lock_irqsave(&pp->lock, flags); |
2140 | } | 2143 | } |
2141 | current->state = TASK_RUNNING; | 2144 | __set_current_state(TASK_RUNNING); |
2142 | remove_wait_queue(&pp->wait, &wait); | 2145 | remove_wait_queue(&pp->wait, &wait); |
2143 | spin_unlock_irqrestore(&pp->lock, flags); | 2146 | spin_unlock_irqrestore(&pp->lock, flags); |
2144 | 2147 | ||