summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* powerpc/mpc85xx: call k(un)map_atomic rather than k(un)mapYanjiang Jin2015-03-311-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 <yanjiang.jin@windriver.com> [scottwood@freescale.com: fix subject line] Signed-off-by: Scott Wood <scottwood@freescale.com>
* powerpc: don't export static symbolJulia Lawall2015-03-311-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 <Julia.Lawall@lip6.fr> Signed-off-by: Scott Wood <scottwood@freescale.com>
* powerpc: book3e_64: fix the align size for paca_structKevin Hao2015-03-311-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 <haokexin@gmail.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* powerpc/fsl-booke: Add T4080 SVR valueMadalin Bucur2015-03-311-0/+1
| | | | | Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* powerpc: Enable power monitor feature in defconfig for supported platformsHongtao Jia2015-03-232-0/+2
| | | | | Signed-off-by: Jia Hongtao <hongtao.jia@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* powerpc: Enable thermal monitor feature in defconfig for supported platformsHongtao Jia2015-03-234-5/+4
| | | | | Signed-off-by: Jia Hongtao <hongtao.jia@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* powerpc/corenet: Enable muxing MDIO buses via FPGAShruti Kanetkar2015-03-233-0/+8
| | | | | | | | Signed-off-by: Andy Fleming <afleming@gmail.com> Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com> Signed-off-by: Shruti Kanetkar <Kanetkar.Shruti@gmail.com> Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* powerpc/corenet: Enable muxing MDIO buses via GPIOAndy Fleming2015-03-233-0/+5
| | | | | | | | Signed-off-by: Andy Fleming <afleming@gmail.com> Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com> Signed-off-by: Shruti Kanetkar <Kanetkar.Shruti@gmail.com> Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* powerpc/mpc85xx: Add FSL QorIQ DPAA BMan support to device tree(s)Kumar Gala2015-03-2326-22/+899
| | | | | | | | | | | Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Geoff Thorpe <Geoff.Thorpe@freescale.com> Signed-off-by: Hai-Ying Wang <Haiying.Wang@freescale.com> Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com> Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com> [Emil Medve: Sync with the upstream binding] Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* powerpc: Make corenet64_defconfig a bit more usefulBenjamin Herrenschmidt2015-03-231-0/+8
| | | | | | | | | CONFIG_BLK_DEV_SD, SR, ... are needed for pretty much any SATA or USB storage device (corenet32_defconfig has them) and modern any with systemd needs the CGROUPS gunk. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Scott Wood <scottwood@freescale.com>
* powerpc/85xx: workaround for chips with MSI hardware errataHongtao Jia2015-03-232-3/+28
| | | | | | | | | | | The MPIC version 2.0 has a MSI errata (errata PIC1 of mpc8544), It causes that neither MSI nor MSI-X can work fine. This is a workaround to allow MSI-X to function properly. Signed-off-by: Liu Shuo <soniccat.liu@gmail.com> Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Jia Hongtao <hongtao.jia@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* powerpc/mpic: Add get_version API both for internal and external useHongtao Jia2015-03-232-0/+13
| | | | | | | | | | | | | | | | | MPIC version is useful information for both mpic_alloc() and mpic_init(). The patch provide an API to get MPIC version for reusing the code. Also, some other IP block may need MPIC version for their own use. The API for external use is also provided. This function had been previously added but was removed by commit 5e86bfde9cd93f2 ("powerpc/mpic: remove unused functions") due to the lack of a user. This function will be used by "powerpc/mpic: Add get_version API both for internal and external use". Signed-off-by: Jia Hongtao <hongtao.jia@freescale.com> Signed-off-by: Li Yang <leoli@freescale.com> [scottwood@freescale.com: changelog update] Signed-off-by: Scott Wood <scottwood@freescale.com>
* powerpc/mpc85xx: Add FMan platform supportIgal Liberman2015-03-232-0/+4
| | | | | | | Get the FMan devices/sub-nodes (MAC, MDIO, etc.) auto-probed Signed-off-by: Igal Liberman <Igal.Liberman@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* powerpc/dts: Remove B4860 emulator supportEmil Medve2015-03-231-223/+0
| | | | | | | Probably we should have not upstreamed this in the first place Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* powerpc/kernel: Rename copy_thread() 'arg' argument to 'kthread_arg'Alex Dowad2015-03-201-2/+7
| | | | | | | | The 'arg' argument to copy_thread() is only ever used when forking a new kernel thread. Hence, rename it to 'kthread_arg' for clarity. Signed-off-by: Alex Dowad <alexinbeijing@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* selftests/powerpc: Rename TARGETS in powerpc selftests makefileMichael Ellerman2015-03-181-6/+6
| | | | | | | | | | | | This patch changes the name of the make variable TARGETS, to prevent it from colliding with a value set by the user on the command line (as they are recommended to do by tools/testing/selftests/README.txt). Without this patch, "make -C tools/testing/selftests TARGETS=powerpc" will fail. Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* selftests/powerpc: Add test for VPHNGreg Kurz2015-03-187-1/+430
| | | | | | | | | | | | | | | The goal is to verify vphn_unpack_associativity() parses VPHN numbers correctly. We feed it with a variety of input values and compare with expected results. PAPR+ does not say much about VPHN parsing: I came up with a list of tests that check many simple cases and some corner ones. I wouldn't dare to say the list is exhaustive though. Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com> [mpe: Rework harness logic, rename to test-vphn, add -m64] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Reviewed-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
* powerpc/vphn: parsing code rewriteGreg Kurz2015-03-182-20/+40
| | | | | | | | | | | | | | | | | | | | | The current VPHN parsing logic has some flaws that this patch aims to fix: 1) when the value 0xffff is read, the value 0xffffffff gets added to the the output list and its element count isn't incremented. This is wrong. According to PAPR+ the domain identifiers are packed into a sequence terminated by the "reserved value of all ones". This means that 0xffff is a stream terminator. 2) the combination of byteswaps and casts make the code hardly readable. Let's parse the stream one 16-bit field at a time instead. 3) it is assumed that the hypercall returns 12 32-bit values packed into 6 64-bit registers. According to PAPR+, the domain identifiers may be streamed as 16-bit values. Let's increase the number of expected numbers to 24. Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* powerpc/vphn: move VPHN parsing logic to a separate fileGreg Kurz2015-03-184-58/+70
| | | | | | | | | The goal behind this patch is to be able to write userland tests for the VPHN parsing code. Suggested-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* powerpc/vphn: move endianness fixing to vphn_unpack_associativity()Greg Kurz2015-03-181-4/+6
| | | | | | | | | The first argument to vphn_unpack_associativity() is a const long *, but the parsing code expects __be64 values actually. Let's move the endian fixing down for consistency. Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* powerpc/vphn: clarify the H_HOME_NODE_ASSOCIATIVITY APIGreg Kurz2015-03-181-2/+6
| | | | | | | | The number of values returned by the H_HOME_NODE_ASSOCIATIVITY h_call deserves to be explicitly defined, for a better understanding of the code. Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* powerpc: kill PPC_OFKevin Hao2015-03-173-6/+3
| | | | | | | | | | | | | We have set CONFIG_PPC_OF to always 'y' in commit 0a498d96a332 ("powerpc: set CONFIG_PPC_OF=y always for ARCH=powerpc") nine years ago. And the arch/ppc also has gone away for many years. The OF functionality was also moved to a common place and be used by many archs. So it does make no sense to keep such a option in the current kernel. Just kill it. Signed-off-by: Kevin Hao <haokexin@gmail.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* fbdev: kconfig: replace PPC_OF with PPCKevin Hao2015-03-171-1/+1
| | | | | | | | | | | | | The PPC_OF is a ppc specific option which is used to mean that the firmware device tree access functions are available. Since all the ppc platforms have a device tree, it is aways set to 'y' for ppc. So it makes no sense to keep a such option in the current kernel. Replace it with PPC. Signed-off-by: Kevin Hao <haokexin@gmail.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* fbdev: remove the unnecessary includes of ppc specific header filesKevin Hao2015-03-171-4/+0
| | | | | | | | | | In the current kernel, we don't need to include these arch specific header files for ppc. Signed-off-by: Kevin Hao <haokexin@gmail.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* fbdev: riva: remove the dependency on PPC_OFKevin Hao2015-03-171-10/+7
| | | | | | | | | | | | The OF functionality has moved to a common place and be used by many archs. So we don't need to include the ppc arch specific header files and depend on PPC_OF option any more. This is a preparation for killing PPC_OF. Signed-off-by: Kevin Hao <haokexin@gmail.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* fbdev: nvidia: remove the dependency on PPC_OFKevin Hao2015-03-174-17/+1
| | | | | | | | | | | | The OF functionality has moved to a common place and be used by many archs. So we don't need to include the ppc arch specific header files and depend on PPC_OF option any more. This is a preparation for killing PPC_OF. Signed-off-by: Kevin Hao <haokexin@gmail.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* fbdev: imsttfb: remove the dependency on PPC_OFKevin Hao2015-03-171-5/+1
| | | | | | | | | | | The OF functionality has moved to a common place and be used by many archs. So we don't need to depend on PPC_OF option any more. This is a preparation for killing PPC_OF. Signed-off-by: Kevin Hao <haokexin@gmail.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* fbdev: radeon: replace PPC_OF with PPCKevin Hao2015-03-175-33/+33
| | | | | | | | | | | | | The PPC_OF is a ppc specific option which is used to mean that the firmware device tree access functions are available. Since all the ppc platforms have a device tree, it is aways set to 'y' for ppc. So it makes no sense to keep a such option in the current kernel. Replace it with PPC. Signed-off-by: Kevin Hao <haokexin@gmail.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* fbdev: aty128fb: replace PPC_OF with PPCKevin Hao2015-03-171-2/+2
| | | | | | | | | | | | | The PPC_OF is a ppc specific option which is used to mean that the firmware device tree access functions are available. Since all the ppc platforms have a device tree, it is aways set to 'y' for ppc. So it makes no sense to keep a such option in the current kernel. Replace it with PPC. Signed-off-by: Kevin Hao <haokexin@gmail.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* sata_svw: remove the dependency on PPC_OFKevin Hao2015-03-171-10/+1
| | | | | | | | | | | | The OF functionality has moved to a common place and be used by many archs. So we don't need to include the ppc arch specific header files and depend on PPC_OF option any more. This is a preparation for killing PPC_OF. Signed-off-by: Kevin Hao <haokexin@gmail.com> Acked-by: Tejun Heo <tj@kernel.org> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* selftests/powerpc: Build the copyloops with -maltivecMichael Ellerman2015-03-171-0/+1
| | | | | | | | | | The recent change to remove the vrX defines exposed the fact that we are building the copyloops tests without altivec enabled. It depends on the toolchain as to whether altivec is on by default or not, so it only breaks on some toolchains. But we should always enable it. Fixes: c2ce6f9f3dc0 ("powerpc: Change vrX register defines to vX to match gcc and glibc") Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* powerpc/book3s: Fix flush_tlb cpu_spec hook to take a generic argument.Mahesh Salgaonkar2015-03-176-15/+65
| | | | | | | | | | | | | | The flush_tlb hook in cpu_spec was introduced as a generic function hook to invalidate TLBs. But the current implementation of flush_tlb hook takes IS (invalidation selector) as an argument which is architecture dependent. Hence, It is not right to have a generic routine where caller has to pass non-generic argument. This patch fixes this and makes flush_tlb hook as high level API. Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* powerpc/boot: don't clobber r6 and r7 in epapr bootJeremy Kerr2015-03-161-12/+12
| | | | | | | | | | | We use r6 and r7 for epapr boot, but the current pre-C init will clobber both of these. This change does a simple replacement, of r6 -> r12 and r7 -> r13, so that we hit platform init with these registers intact. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* powerpc/boot: Fix stack corruption in epapr entry pointJeremy Kerr2015-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, a 64-bit little-endian zImage.epapr won't boot in epapr mode, as we never return from platform_init. Before entering C, we initialise our stack by setting r1 16 bytes below the end of the _bss_stack: stwu r0,-16(r1) /* establish a stack frame */ However, the called function will save the caller's lr in the caller's frame's lr save area, at -16(r1) to -32(r1). This means that writes to the fdt variable will corrupt the saved link register: 0000000020c06018 l O .bss 0000000000001000 _bss_stack 0000000020c07018 l O .bss 0000000000000008 fdt We'll need at least 32 bytes in the initial stack frame, to handle the LR save area. We bump this to 112 bytes, as that'll be the max required by ABIv1. Thanks to Alistair Popple for debugging help. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* powerpc/boot/wrapper: use the pseries wrapper for zImage.epaprJeremy Kerr2015-03-161-1/+1
| | | | | | | | | | | | We'll likely be entering the zImage.epapr as BE, so include the pseries implementation of _zimage_start, which adds the endian fixup magic. Although the endian fixup won't work on Book III-E machines starting LE, the current entry point doesn't support LE anyway, so we shouldn't be breaking anything. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* powerpc/boot/fdt: Add little-endian support to libfdt wrappersJeremy Kerr2015-03-162-6/+16
| | | | | | | | | | For epapr-style boot, we may be little-endian. This change implements the proper conversion for fdt*_to_cpu and cpu_to_fdt*. We also need the full cpu_to_* and *_to_cpu macros for this. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* powerpc/boot/fdt: Use unsigned long for pointer castsJeremy Kerr2015-03-161-3/+3
| | | | | | | | Now that the wrapper supports 64-bit builds, we see warnings when attempting to cast pointers to int. Use unsigned long instead. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* powerpc/mpic: remove unused functionsArseny Solokha2015-03-162-55/+0
| | | | | | | | | | | | | | | | | | | | | | Drop unused fsl_mpic_primary_get_version(), mpic_set_clk_ratio(), mpic_set_serial_int(). + fsl_mpic_primary_get_version() is just a safe wrapper around fsl_mpic_get_version() for SMP configurations. While the latter is called explicitly for handling PIC initialization and setting up error interrupt vector depending on PIC hardware version, the former isn't used for anything. + As for mpic_set_clk_ratio() and mpic_set_serial_int(), they both are almost nine years old[1] but still have no chance to be called even from out-of-tree modules because they both are __init and of course aren't exported. [1] https://lists.ozlabs.org/pipermail/linuxppc-dev/2006-June/023867.html Signed-off-by: Arseny Solokha <asolokha@kb.kras.ru> Cc: hongtao.jia@freescale.com Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* powerpc/qe: drop unused ucc_slow_poll_transmitter_nowArseny Solokha2015-03-162-18/+0
| | | | | | | | | Drop ucc_slow_poll_transmitter_now() which has no users since its inception in 2007 in commit 986585385131 ("[POWERPC] Add QUICC Engine (QE) infrastructure"). Signed-off-by: Arseny Solokha <asolokha@kb.kras.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* powerpc/boot: drop planetcore_set_serial_speedArseny Solokha2015-03-162-36/+0
| | | | | | | | | Drop planetcore_set_serial_speed() which had no users since its inception in commit fec6047047fd ("[POWERPC] bootwrapper: Add PlanetCore firmware support") in 2007. Signed-off-by: Arseny Solokha <asolokha@kb.kras.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* powerpc/powernv: Remove unused definitions in opal-api.hMichael Ellerman2015-03-161-47/+0
| | | | | | | | | | | | | This removes definitions in opal-api.h that are completely unused in Linux. For each of these I see three possibilities, 1) we *should* be using them in Linux and patches will arrive to do that, 2) they are not used but should stay in the header to document the API for some important reason, 3) they are not used and needn't be part of the API. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Reviewed-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* powerpc/powernv: Move opal-api.h closer to the Skiboot versionMichael Ellerman2015-03-164-74/+90
| | | | | | | | | | | | | | | | | | | | This commit gets opal-api.h to mostly match the version in Skiboot as of commit ea7d806ab0ba. The exceptions are things which are not (currently) used in Linux. Most of this is just whitespace and a few things moving around. I think the diff is readable. Also OpalMessageType became opal_msg_type, requiring a change in the Linux code. Finally Skiboot and Linux disagree on CAPI vs CXL, because CAPI means something else in Linux. To handle that we just point the Linux wrapper, which is named "cxl" to the OPAL token OPAL_PCI_SET_PHB_CAPI_MODE. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Reviewed-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* powerpc/powernv: Move OPAL API definitions to opal-api.hMichael Ellerman2015-03-162-751/+769
| | | | | | | | | | | We'd like to get to the stage where the OPAL API is defined in a header that is identical between Linux and Skiboot. As step one, split the bits that actually define the API into opal-api.h. The Linux specific parts stay in opal.h. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Acked-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* powerpc/boot: Makefile cleanupMichal Marek2015-03-161-1/+1
| | | | | | | | The $(image-n) variable will never exist, because unset Kconfig options are '' and not 'n'. Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* powerpc: Delete unnecessary checks before kfree()Markus Elfring2015-03-162-4/+3
| | | | | | | | | | The kfree() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* powerpc/powernv: only call OPAL_RESEND_DUMP if firmware supports itStewart Smith2015-03-161-1/+2
| | | | | | | | | | | Not all OPAL platforms support resending system dumps, so check that current firmware supports it first. Otherwise we get firmware complaining: "OPAL: Called with bad token 91 !" Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> Acked-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* powerpc/powernv: only call OPAL_ELOG_RESEND if firmware supports itStewart Smith2015-03-161-1/+2
| | | | | | | | | Otherwise firmware complains: "OPAL: Called with bad token 74 !" as not all OPAL systems have the ability to resend error logs. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> Acked-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* powerpc/powernv: only register log if OPAL supports doing soStewart Smith2015-03-161-1/+5
| | | | | | | | | | Correct use of REGISTER/UNREGISTER is to check if the token exists before calling. If we don't we get a "OPAL: Called with bad token 101 !" error, which is harmless but may be alarming to some. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> Acked-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* powerpc: Change vsrX register defines to vsX to match gcc and glibcAnton Blanchard2015-03-162-67/+67
| | | | | | | | | | | | | | | | As our various loops (copy, string, crypto etc) get more complicated, we want to share implementations between userspace (eg glibc) and the kernel. We also want to write userspace test harnesses to put in tools/testing/selftest. One gratuitous difference between userspace and the kernel is the VSX register definitions - the kernel uses vsrX whereas gcc uses vsX. Change the kernel to match userspace. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
* powerpc: Change vrX register defines to vX to match gcc and glibcAnton Blanchard2015-03-1610-385/+352
| | | | | | | | | | | | | | | | As our various loops (copy, string, crypto etc) get more complicated, we want to share implementations between userspace (eg glibc) and the kernel. We also want to write userspace test harnesses to put in tools/testing/selftest. One gratuitous difference between userspace and the kernel is the VMX register definitions - the kernel uses vrX whereas both gcc and glibc use vX. Change the kernel to match userspace. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
OpenPOWER on IntegriCloud