aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-04-11powerpc/perf/hv-24x7: Move debug prints to separate functionSukadev Bhattiprolu1-6/+16
To simplify/cleanup code, move the rather long printk() to a separate function. Signed-off-by: Sukadev Bhattiprolu <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-11powerpc/perf/hv-24x7: Drop event_24x7_request()Sukadev Bhattiprolu1-25/+15
The function event_24x7_request() is essentially a wrapper to the function single_24x7_request() and can be dropped to simplify code. Signed-off-by: Sukadev Bhattiprolu <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-11powerpc/perf/hv-24x7: Use pr_devel() to log messageSukadev Bhattiprolu1-1/+1
Use pr_devel_ratelimited() to log error message when the 24x7 HCALL fails. Since users specify events by their sysfs name, the HCALL should succeed. Any errors reported by the HCALL would be of interest to the developer, rather than the user/administrator. Signed-off-by: Sukadev Bhattiprolu <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-11powerpc/perf/hv-24x7: Remove unnecessary parameterSukadev Bhattiprolu1-10/+6
Remove the 'success_expected' parameter and log the message unconditionally. Signed-off-by: Sukadev Bhattiprolu <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-11powerpc/perf/hv-24x7: Modify definition of request and result buffersSukadev Bhattiprolu2-44/+41
The parameters to the 24x7 HCALL have variable number of elements in them. Set the minimum number of such elements to 1 rather than 0 and eliminate the temporary structures. This would enable us to submit multiple counter requests and process multiple results from a single HCALL (in a follow on patch). Signed-off-by: Sukadev Bhattiprolu <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-11powerpc/powernv: Add interfaces for flash device accessCyril Bur5-4/+31
This change adds the OPAL interface definitions to allow Linux to read, write and erase from system flash devices. We register platform devices for the flash devices exported by firmware. We clash with the existing opal_flash_init function, which is really for the FSP flash update functionality, so we rename that initcall to opal_flash_update_init(). A future change will add an mtd driver that uses this interface. Changes from Joel Stanley and Jeremy Kerr. Signed-off-by: Cyril Bur <[email protected]> Signed-off-by: Jeremy Kerr <[email protected]> Signed-off-by: Joel Stanley <[email protected]> Acked-by: Stewart Smith <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-11powerpc/tm: Correct minor documentation typosSam bobroff1-2/+2
Signed-off-by: Sam Bobroff <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-11selftests/powerpc: Add transactional syscall testSam bobroff4-1/+153
Check that a syscall made during an active transaction will fail with the correct failure code and that one made during a suspended transaction will succeed. Signed-off-by: Sam Bobroff <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-11selftests/powerpc: Move get_auxv_entry() to harness.cSam bobroff4-49/+48
Move get_auxv_entry() from pmu/lib.c up to harness.c in order to make it available to other tests. Signed-off-by: Sam Bobroff <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-11powerpc/tm: Abort syscalls in active transactionsSam bobroff3-17/+36
This patch changes the syscall handler to doom (tabort) active transactions when a syscall is made and return immediately without performing the syscall. Currently, the system call instruction automatically suspends an active transaction which causes side effects to persist when an active transaction fails. This does change the kernel's behaviour, but in a way that was documented as unsupported. It doesn't reduce functionality because syscalls will still be performed after tsuspend. It also provides a consistent interface and makes the behaviour of user code substantially the same across powerpc and platforms that do not support suspended transactions (e.g. x86 and s390). Performance measurements using http://ozlabs.org/~anton/junkcode/null_syscall.c indicate the cost of a system call increases by about 0.5%. Signed-off-by: Sam Bobroff <[email protected]> Acked-By: Michael Neuling <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-11powerpc: dart_iommu: Remove check for controller_ops == NULL caseDaniel Axtens1-8/+5
Now that we have ported the calls to iommu_init_early_dart to always supply a pci_controller_ops struct, we can safely drop the check. Signed-off-by: Daniel Axtens <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-11powerpc: Remove shims for pci_controller_ops operationsDaniel Axtens7-113/+50
Remove shims, patch callsites to use pci_controller_ops versions instead. Also move back the probe mode defines, as explained in the patch for pci_probe_mode. Signed-off-by: Daniel Axtens <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-11powerpc/cell: Move controller ops from ppc_md to controller_opsDaniel Axtens3-3/+33
This moves the Cell platform to use the pci_controller_ops structure rather than ppc_md for PCI controller operations. Signed-off-by: Daniel Axtens <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-11powerpc: fsl_pci, swiotlb: Move controller ops from ppc_md to controller_opsDaniel Axtens2-7/+19
Move the installation of DMA operations out of swiotlb's subsys initcall, and into the generic PCI controller operations struct. These ops are installed conditionally, based on the ppc_swiotlb_enable global. The global can be set in two places: - swiotlb_detect_4g, which is always called at the arch initcall level - setup_pci_atmu, which is called as part of the fsl_add_bridge and fsl_pci_syscore_do_resume. fsl_pci_syscore_do_resume is called late enough that any changes as a result of that call will have no effect. As such, if we test the global and set the operations as part of fsl_add_bridge, after the call to setup_pci_atmu, we can be confident that it will cover all the PCI implementations affected by the changes to dma-swiotlb.c. Signed-off-by: Daniel Axtens <[email protected]> Acked-by: Scott Wood <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-11powerpc/maple: Move controller ops from ppc_md to controller_opsDaniel Axtens3-1/+7
This moves the Maple platform to use the pci_controller_ops structure rather than ppc_md for PCI controller operations. Signed-off-by: Daniel Axtens <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-11powerpc/pasemi: Move controller ops from ppc_md to controller_opsDaniel Axtens3-2/+10
This moves the PaSemi platform to use the pci_controller_ops structure rather than ppc_md for PCI controller operations. Signed-off-by: Daniel Axtens <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-11powerpc/powernv: Move controller ops from ppc_md to controller_opsDaniel Axtens4-4/+11
This moves the PowerNV platform to use the pci_controller_ops structure rather than ppc_md for PCI controller operations. Signed-off-by: Daniel Axtens <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-11powerpc/pseries: Move controller ops from ppc_md to controller_opsDaniel Axtens4-5/+15
This moves the pSeries platform to use the pci_controller_ops structure, rather than ppc_md for PCI controller operations. Signed-off-by: Daniel Axtens <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-11powerpc/powermac: Move controller ops from ppc_md to controller_opsDaniel Axtens3-9/+17
This moves the Power Mac platform to use the pci_controller_ops structure rather than ppc_md for PCI controller operations. Signed-off-by: Daniel Axtens <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-11powerpc: dart_iommu: optionally populate controller_ops on initDaniel Axtens4-7/+16
If a pci_controller_ops struct is provided to iommu_init_early_dart, populate that with the DMA setup ops, rather than ppc_md. If NULL is provided, populate ppc_md as before. This also patches the call sites for Maple and Power Mac to pass NULL, so existing behaviour is preserved. The benefit of making this optional is that it means we don't have to change dart, Maple and Power Mac over to the controller_ops system in one fell swoop. Signed-off-by: Daniel Axtens <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-11powerpc: Create pci_controller_ops.reset_secondary_bus and shimDaniel Axtens2-6/+18
Add pci_controller_ops.reset_secondary_bus, shadowing ppc_md.pcibios_reset_secondary_bus. Add a shim, and changes the callsites to use the shim. Use pcibios_reset_secondary_bus_shim, as both pcibios_reset_secondary_bus and pci_reset_secondary_bus are already taken. Signed-off-by: Daniel Axtens <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-11powerpc: Create pci_controller_ops.window_alignment and shimDaniel Axtens2-9/+22
Add pci_controller_ops.window_alignment, shadowing ppc_md.pcibios_window_alignment. Add a shim, and changes the callsites to use the shim. Here, we use pci_window_alignment, as pcibios_window_alignment is already taken. Signed-off-by: Daniel Axtens <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-11powerpc: Create pci_controller_ops.enable_device_hook and shimDaniel Axtens2-3/+17
Add pci_controller_ops.enable_device_hook, shadowing ppc_md.pcibios_enable_device_hook. Add a shim, and changes the callsites to use the shim. Signed-off-by: Daniel Axtens <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-11powerpc: Create pci_controller_ops.probe_mode and shimDaniel Axtens5-11/+22
Add pci_controller_ops.probe_mode, shadowing ppc_md.pci_probe_mode. Add a shim, and changes the callsites to use the shim. We also need to move the probe mode defines to pci-bridge.h from pci.h. They are required by the shim in order to return a sensible default. Previously, the were defined in pci.h, but pci.h includes pci-bridge.h before the relevant #defines. This means the definitions are absent if pci.h is included before pci-bridge.h. This occurs in some drivers. So, move the definitons now, and move them back when we remove the shim. Anything that wants the defines would have had to include pci.h, and since pci.h includes pci-bridge.h, nothing will lose access to the defines. Signed-off-by: Daniel Axtens <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-11powerpc: Create pci_controller_ops.dma_bus_setup and shimDaniel Axtens2-2/+12
Add pci_controller_ops.dma_bus_setup, shadowing ppc_md.pci_dma_bus_setup. Add a shim, and changes the callsites to use the shim. Signed-off-by: Daniel Axtens <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-11powerpc: Create pci_controller_ops.dma_dev_setup and shimDaniel Axtens2-2/+22
Introduces the pci_controller_ops structure. Add pci_controller_ops.dma_dev_setup, shadowing ppc_md.pci_dma_dev_setup. Add a shim, and change the callsites to use the shim. Signed-off-by: Daniel Axtens <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-11powerpc: pcibios_enable_device_hook: return bool rather than intDaniel Axtens5-12/+12
pcibios_enable_device_hook returned an int. Every implementation returned either -EINVAL or 0. The return value wasn't propagated by the caller: any non-zero return value caused pcibios_enable_device to return -EINVAL itself. Therefore, make the hook return a bool. Signed-off-by: Daniel Axtens <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-11powerpc/powermac: move pmac_pci_probe_mode from setup.c to pci.cDaniel Axtens3-18/+21
Signed-off-by: Daniel Axtens <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-11powerpc: move find_and_init_phbs() to pSeries specific codeDaniel Axtens3-50/+47
Previously, find_and_init_phbs() was used in both PowerNV and pSeries setup. However, since RTAS support has been dropped from PowerNV, we can move it into a platform-specific file. Signed-off-by: Daniel Axtens <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-10powerpc: Drop return value of smp_ops->probe()Michael Ellerman8-29/+12
smp_ops->probe() is currently supposed to return the number of cpus in the system. The last actual usage of the value was removed in May 2007 in e147ec8f1808 "[POWERPC] Simplify smp_space_timers". We still passed the value around until June 2010 when even that was finally removed in c1aa687d499a "powerpc: Clean up obsolete code relating to decrementer and timebase". So drop that requirement, probe() now returns void, and update all implementations. Signed-off-by: Michael Ellerman <[email protected]>
2015-04-10powerpc/cell: Fix cell iommu after it_page_shift changesMichael Ellerman1-1/+1
The patch to add it_page_shift incorrectly changed the increment of uaddr to use it_page_shift, rather then (1 << it_page_shift). This broke booting on at least some Cell blades, as the iommu was basically non-functional. Fixes: 3a553170d35d ("powerpc/iommu: Add it_page_shift field to determine iommu page size") Signed-off-by: Michael Ellerman <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2015-04-10powerpc/cell: Fix crash in iic_setup_cpu() after per_cpu changesMichael Ellerman1-1/+1
The conversion from __get_cpu_var() to this_cpu_ptr() in iic_setup_cpu() is wrong. It causes an oops at boot. We need the per-cpu address of struct cpu_iic, not cpu_iic.regs->prio. Sparse noticed this, because we pass a non-iomem pointer to out_be64(), but we obviously don't check the sparse results often enough. Fixes: 69111bac42f5 ("powerpc: Replace __get_cpu_var uses") Signed-off-by: Michael Ellerman <[email protected]>
2015-04-10powerpc: Reword the "returning from prom_init" messageMichael Ellerman1-2/+2
We get way too many bug reports that say "the kernel is hung in prom_init", which stems from the fact that the last piece of output people see is "returning from prom_init". The kernel is almost never hung in prom_init(), it's just that it's crashed somewhere after prom_init() but prior to the console coming up. The existing message should give a clue to that, ie. "returning from" indicates that prom_init() has finished, but it doesn't seem to work. Let's try something different. This prints: Quiescing Open Firmware ... Booting Linux via __start() ... Which hopefully makes it clear that prom_init() is not the problem, and although __start() probably isn't either, it's at least the right place to begin looking. Signed-off-by: Michael Ellerman <[email protected]> Wistfully-Acked-by: Jeremy Kerr <[email protected]>
2015-04-10powerpc: Replace mem_init_done with slab_is_available()Michael Ellerman7-15/+10
We have a powerpc specific global called mem_init_done which is "set on boot once kmalloc can be called". But that's not *quite* true. We set it at the bottom of mem_init(), and rely on the fact that mm_init() calls kmem_cache_init() immediately after that, and nothing is running in parallel. So replace it with the generic and 100% correct slab_is_available(). Signed-off-by: Michael Ellerman <[email protected]>
2015-04-10powerpc: Fix compile errors with STRICT_MM_TYPECHECKS enabledMichael Ellerman8-14/+16
Signed-off-by: Aneesh Kumar K.V <[email protected]> [mpe: Fix the 32-bit code also] Signed-off-by: Michael Ellerman <[email protected]>
2015-04-07powerpc/mm: Change setbat() to take a pgprot_t rather than flagsMichael Ellerman2-2/+3
The callers of setbat() are actually passing a pgprot_t for the flags parameter. This doesn't matter unless STRICT_MM_TYPECHECKS is enabled. So we can turn that on without breaking the build, change setbat() to take a pgprot_t and have it convert it to an unsigned long internally. Signed-off-by: Michael Ellerman <[email protected]>
2015-04-07powerpc/mm: Remove duplicate declaration of setbat()Michael Ellerman1-3/+0
This is already declared in mmu_decl.h, so we don't need a second version in the C file. Signed-off-by: Michael Ellerman <[email protected]>
2015-04-07powerpc: Remove the celleb supportMichael Ellerman31-4580/+1
The celleb code has seen no actual development for ~7 years. We (maintainers) have no access to test hardware, and it is highly likely the code has bit-rotted. As far as we're aware the hardware was never widely available, and is certainly no longer available, and no one on the list has shown any interest in it over the years. So remove it. If anyone has one and cares please speak up. Signed-off-by: Michael Ellerman <[email protected]> Acked-by: Benjamin Herrenschmidt <[email protected]> Acked-by: Jeremy Kerr <[email protected]>
2015-04-07powerpc/powernv: Remove powernv RTAS supportMichael Ellerman4-118/+19
The powernv code has some conditional support for running on bare metal machines that have no OPAL firmware, but provide RTAS. No released machines ever supported that, and even in the lab it was just a transitional hack in the days when OPAL was still being developed. So remove the code. Signed-off-by: Michael Ellerman <[email protected]> Acked-by: Benjamin Herrenschmidt <[email protected]> Acked-by: Stewart Smith <[email protected]>
2015-04-07Merge branch 'next-remove-ldst' of ↵Michael Ellerman19-190/+139
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc into next
2015-04-07Merge branch 'next-eeh' of ↵Michael Ellerman28-1648/+1652
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc into next
2015-04-07Merge branch 'next' of ↵Michael Ellerman41-284/+981
git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux into next 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."
2015-03-31powerpc/corenet: enable CONFIG_I2C_MUX and CONFIG_I2C_MUX_PCA954xShengzhou Liu2-0/+4
By default we enable CONFIG_I2C_MUX and CONFIG_I2C_MUX_PCA954x, which are needed on T2080QDS, T4240QDS, B4860QDS, etc. Signed-off-by: Shengzhou Liu <[email protected]> [[email protected]: fixed subject line] Signed-off-by: Scott Wood <[email protected]>
2015-03-31powerpc/t2080qds: fix rtc interruptShengzhou Liu1-1/+1
RTC interrupt uses IRQ11 on T2080QDS. Signed-off-by: Shengzhou Liu <[email protected]> [[email protected]: fix subject line] Signed-off-by: Scott Wood <[email protected]>
2015-03-31powerpc/mpic: Remove WHOAMI readback after EOIBogdan Purcareata1-1/+0
After previous discussions regarding the subject [1][2], there's no clear explanation or reason why the call was needed in the first place. The sensible argument is some sort of synchronization between the CPU and the MPIC, which hasn't been pointed out precisely and is no longer required (at least on BookE platforms). The benefit of this change is saving a MMIO trap per interrupt when running in a KVM guest. [1] https://patchwork.ozlabs.org/patch/429098/ [2] https://patchwork.ozlabs.org/patch/433557/ Signed-off-by: Bogdan Purcareata <[email protected]> Signed-off-by: Scott Wood <[email protected]>
2015-03-31powerpc/mpc85xx: call k(un)map_atomic rather than k(un)mapYanjiang Jin1-2/+2
The k(un)map function may be called in atomic context in the function map_and_flush(), so use k(un)map_atomic to replace it, else we would get the below warning during kdump: BUG: sleeping function called from invalid context at include/linux/highmem.h:58 in_atomic(): 1, irqs_disabled(): 1, pid: 736, name: sh INFO: lockdep is turned off. irq event stamp: 0 hardirqs last enabled at (0): [< (null)>] (null) hardirqs last disabled at (0): [<c000000000066d1c>] .copy_process.part.44+0x50c/0x1360 softirqs last enabled at (0): [<c000000000066d1c>] .copy_process.part.44+0x50c/0x1360 softirqs last disabled at (0): [< (null)>] (null) CPU: 1 PID: 736 Comm: sh Tainted: G D W 3.10.62-ltsi-WR6.0.0.0_standard #2 Call Trace: [c0000000f47cf120] [c00000000000b150] .show_stack+0x170/0x290 (unreliable) [c0000000f47cf210] [c000000000b71334] .dump_stack+0x28/0x3c [c0000000f47cf280] [c0000000000bb5d8] .__might_sleep+0x1a8/0x270 [c0000000f47cf310] [c0000000000440cc] .map_and_flush+0x4c/0xc0 [c0000000f47cf390] [c0000000000441cc] .mpc85xx_smp_machine_kexec+0x8c/0xec0 [c0000000f47cf420] [c00000000002ae00] .machine_kexec+0x60/0x90 [c0000000f47cf4b0] [c00000000010957c] .crash_kexec+0x8c/0x100 [c0000000f47cf6a0] [c000000000015df8] .die+0x348/0x450 [c0000000f47cf740] [c00000000002f3a0] .bad_page_fault+0xe0/0x130 [c0000000f47cf7c0] [c00000000001f3e4] storage_fault_common+0x40/0x44 Signed-off-by: Yanjiang Jin <[email protected]> [[email protected]: fix subject line] Signed-off-by: Scott Wood <[email protected]>
2015-03-31powerpc: don't export static symbolJulia Lawall1-25/+0
The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ type T; identifier f; @@ static T f (...) { ... } @@ identifier r.f; declarer name EXPORT_SYMBOL; @@ -EXPORT_SYMBOL(f); // </smpl> Furthermore, the function is never used, so its definition is dropped as well. Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Scott Wood <[email protected]>
2015-03-31powerpc: book3e_64: fix the align size for paca_structKevin Hao1-2/+2
All the cache line size of the current book3e 64bit SoCs are 64 bytes. So we should use this size to align the member of paca_struct. This only change the paca_struct's members which are private to book3e CPUs, and should not have any effect to book3s ones. With this, we save 192 bytes. Also change it to __aligned(size) since it is preferred over __attribute__((aligned(size))). Before: /* size: 1920, cachelines: 30, members: 46 */ /* sum members: 1667, holes: 6, sum holes: 141 */ /* padding: 112 */ After: /* size: 1728, cachelines: 27, members: 46 */ /* sum members: 1667, holes: 4, sum holes: 13 */ /* padding: 48 */ Signed-off-by: Kevin Hao <[email protected]> Signed-off-by: Scott Wood <[email protected]>
2015-03-31powerpc/fsl-booke: Add T4080 SVR valueMadalin Bucur1-0/+1
Signed-off-by: Madalin Bucur <[email protected]> Signed-off-by: Scott Wood <[email protected]>
2015-03-31powerpc32/chrp: fix section mismatch warningLEROY Christophe1-1/+1
This patch fixes a section mismatch warning WARNING: vmlinux.o(.text+0x213b6): Section mismatch in reference from the function chrp_init_early() to the variable .init.data:boot_command_line The function chrp_init_early() references the variable __initdata boot_command_line. This is often because chrp_init_early lacks a __initdata annotation or the annotation of boot_command_line is wrong. Signed-off-by: Christophe Leroy <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>