summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'next' of ↵Linus Torvalds2013-11-12168-2125/+4200
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc Pull powerpc updates from Benjamin Herrenschmidt: "The bulk of this is LE updates. One should now be able to build an LE kernel and even run some things in it. I'm still sitting on a handful of patches to enable the new ABI that I *might* still send this merge window around, but due to the incertainty (they are pretty fresh) I want to keep them separate. Other notable changes are some infrastructure bits to better handle PCI pass-through under KVM, some bits and pieces added to the new PowerNV platform support such as access to the CPU SCOM bus via sysfs, and support for EEH error handling on PHB3 (Power8 PCIe). We also grew arch_get_random_long() for both pseries and powernv when running on P7+ and P8, exploiting the HW rng. And finally various embedded updates from freescale" * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (154 commits) powerpc: Fix fatal SLB miss when restoring PPR powerpc/powernv: Reserve the correct PE number powerpc/powernv: Add PE to its own PELTV powerpc/powernv: Add support for indirect XSCOM via debugfs powerpc/scom: Improve debugfs interface powerpc/scom: Enable 64-bit addresses powerpc/boot: Properly handle the base "of" boot wrapper powerpc/bpf: Support MOD operation powerpc/bpf: Fix DIVWU instruction opcode of: Move definition of of_find_next_cache_node into common code. powerpc: Remove big endianness assumption in of_find_next_cache_node powerpc/tm: Remove interrupt disable in __switch_to() powerpc: word-at-a-time optimization for 64-bit Little Endian powerpc/bpf: BPF JIT compiler for 64-bit Little Endian powerpc: Only save/restore SDR1 if in hypervisor mode powerpc/pmu: Fix ADB_PMU_LED_IDE dependencies powerpc/nvram: Fix endian issue when using the partition length powerpc/nvram: Fix endian issue when reading the NVRAM size powerpc/nvram: Scan partitions only once powerpc/mpc512x: remove unnecessary #if ...
| * powerpc: Fix fatal SLB miss when restoring PPRBenjamin Herrenschmidt2013-11-062-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | When restoring the PPR value, we incorrectly access the thread structure at a time where MSR:RI is clear, which means we cannot recover from nested faults. However the thread structure isn't covered by the "bolted" SLB entries and thus accessing can fault. This fixes it by splitting the code so that the PPR value is loaded into a GPR before MSR:RI is cleared. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc/powernv: Reserve the correct PE numberGavin Shan2013-11-063-16/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're assigning PE numbers after the completion of PCI probe. During the PCI probe, we had PE#0 as the super container to encompass all PCI devices. However, that's inappropriate since PELTM has ascending order of priority on search on P7IOC. So we need PE#127 takes the role that PE#0 has previously. For PHB3, we still have PE#0 as the reserved PE. The patch supposes that the underly firmware has built the RID to PE# mapping after resetting IODA tables: all PELTM entries except last one has invalid mapping on P7IOC, but all RTEs have binding to PE#0. The reserved PE# is being exported by firmware by device tree. Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc/powernv: Add PE to its own PELTVGavin Shan2013-11-061-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | We need add PE to its own PELTV. Otherwise, the errors originated from the PE might contribute to other PEs. In the result, we can't clear up the error successfully even we're checking and clearing errors during access to PCI config space. Cc: stable@vger.kernel.org Reported-by: kalshett@in.ibm.com Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc/powernv: Add support for indirect XSCOM via debugfsBenjamin Herrenschmidt2013-11-061-0/+23
| | | | | | | | | | | | | | | | Indirect XSCOM addresses normally have the top bit set (of the 64-bit address). This doesn't work via the normal debugfs interface, so we use a different encoding, which we need to convert before calling OPAL. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc/scom: Improve debugfs interfaceBenjamin Herrenschmidt2013-11-061-55/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current debugfs interface to scom is essentially unused and racy. It uses two different files "address" and "data" to perform accesses which is at best impractical for anything but manual use by a developer. This replaces it with an "access" file which represent the entire scom address space which can be lseek/read/writen too. This file only supports accesses that are 8 bytes aligned and multiple of 8 bytes in size. The offset is logically the SCOM address multiplied by 8. Since nothing in userspace exploits that file at the moment, the ABI change is a no-brainer. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc/scom: Enable 64-bit addressesBenjamin Herrenschmidt2013-11-063-9/+9
| | | | | | | | | | | | | | | | On P8, XSCOM addresses has a special "indirect" form that requires more than 32-bits, so let's use u64 everywhere in the code instead of u32. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc/boot: Properly handle the base "of" boot wrapperBenjamin Herrenschmidt2013-11-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The wrapper script needs an explicit rule for the "of" boot wrapper (generic wrapper, similar to pseries). Before 0c9fa29149d3726e14262aeb0c8461a948cc9d56 it was hanlded implicitly by the statement: platformo=$object/"$platform".o But now that epapr.o needs to be added, that doesn't work and an explicit rule must be added. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * Merge remote-tracking branch 'agust/next' into nextBenjamin Herrenschmidt2013-11-044-18/+10
| |\ | | | | | | | | | | | | | | | | | | | | | Fixes for build issues when LPB FIFO driver is configured as a module, removal of #ifdefs in mpc512x DIU platform code and a revert of recent changes to mpc52xx PIC driver. Wolfram provided a better fix for PIC driver build issue popping up when older gcc-4.3.5 is used.
| | * powerpc/mpc512x: remove unnecessary #ifBrian Norris2013-10-302-17/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several functions are only ever referenced locally, so make them static. Of those functions, many of them are protected by an #if. However, the code which can compile fine in either case. Now that (1) the unneeded code is marked 'static' and (2) the code is only used under a C 'if (IS_ENABLED(CONFIG_FB_FSL_DIU))', the compiler can automatically remove the unneeded code, and we don't need the #if or the empty stub functions. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
| | * powerpc/52xx: fix build breakage for MPC5200 LPBFIFO moduleAnatolij Gustschin2013-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The MPC5200 LPBFIFO driver requires the bestcomm module to be enabled, otherwise building will fail. Fix it. Cc: <stable@vger.kernel.org> # 3.10+ Reported-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Anatolij Gustschin <agust@denx.de>
| | * Kind of revert "powerpc: 52xx: provide a default in mpc52xx_irqhost_map()"Wolfram Sang2013-10-301-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This more or less reverts commit 6391f697d4892a6f233501beea553e13f7745a23. Instead of adding an unneeded 'default', mark the variable to prevent the false positive 'uninitialized var'. The other change (fixing the printout) needs revert, too. We want to know WHICH critical irq failed, not which level it had. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: Anatolij Gustschin <agust@denx.de> Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Anatolij Gustschin <agust@denx.de>
| | * powerpc/mpc512x: silence build warning upon disabled DIUGerhard Sittig2013-10-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a disabled Kconfig option results in a reference to a not implemented routine when the IS_ENABLED() macro is used for both conditional implementation of the routine as well as a C language source code test at the call site -- the "if (0) func();" construct only gets eliminated later by the optimizer, while the compiler already has emitted its warning about "func()" being undeclared provide an empty implementation for the mpc512x_setup_diu() and mpc512x_init_diu() routines in case of the disabled option, to avoid the compiler warning which is considered fatal and breaks compilation the bug appeared with commit 2abbbb63c90ab55ca3f054772c2e5ba7df810c48 "powerpc/mpc512x: move common code to shared.c file", how to reproduce: make mpc512x_defconfig echo CONFIG_FB_FSL_DIU=n >> .config && make olddefconfig make CC arch/powerpc/platforms/512x/mpc512x_shared.o .../arch/powerpc/platforms/512x/mpc512x_shared.c: In function 'mpc512x_init_early': .../arch/powerpc/platforms/512x/mpc512x_shared.c:456:3: error: implicit declaration of function 'mpc512x_init_diu' [-Werror=implicit-function-declaration] .../arch/powerpc/platforms/512x/mpc512x_shared.c: In function 'mpc512x_setup_arch': .../arch/powerpc/platforms/512x/mpc512x_shared.c:469:3: error: implicit declaration of function 'mpc512x_setup_diu' [-Werror=implicit-function-declaration] cc1: all warnings being treated as errors make[4]: *** [arch/powerpc/platforms/512x/mpc512x_shared.o] Error 1 Signed-off-by: Gerhard Sittig <gsi@denx.de> CC: <stable@vger.kernel.org> # v3.11 Signed-off-by: Anatolij Gustschin <agust@denx.de>
| * | powerpc/bpf: Support MOD operationVladimir Murzin2013-10-312-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit b6069a9570 (filter: add MOD operation) added generic support for modulus operation in BPF. This patch brings JIT support for PPC64 Signed-off-by: Vladimir Murzin <murzin.v@gmail.com> Acked-by: Matt Evans <matt@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | powerpc/bpf: Fix DIVWU instruction opcodeVladimir Murzin2013-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently DIVWU stands for *signed* divw opcode: 7d 2a 4b 96 divwu r9,r10,r9 7d 2a 4b d6 divw r9,r10,r9 Use the *unsigned* divw opcode for DIVWU. Suggested-by: Vassili Karpov <av1474@comtv.ru> Reviewed-by: Vassili Karpov <av1474@comtv.ru> Signed-off-by: Vladimir Murzin <murzin.v@gmail.com> Acked-by: Matt Evans <matt@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | of: Move definition of of_find_next_cache_node into common code.Sudeep KarkadaNagesha2013-10-314-34/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the definition of_find_next_cache_node is architecture independent, the existing definition in powerpc can be moved to driver/of/base.c Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Grant Likely <grant.likely@linaro.org> Cc: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | powerpc: Remove big endianness assumption in of_find_next_cache_nodeSudeep KarkadaNagesha2013-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently big endianness of the device tree data is assumed in of_find_next_cache_node for 'handle' when calling of_find_node_by_phandle. In preparation to move this function to common code, this patch fixes the endianness using 'be32_to_cpup' Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Grant Likely <grant.likely@linaro.org> Cc: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | powerpc/tm: Remove interrupt disable in __switch_to()Michael Neuling2013-10-311-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently turn IRQs off in __switch_to(0 but this is unnecessary as it's already disabled in the caller. This removes the IRQ disable but adds a check to make sure it is really off in case this changes in future. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | powerpc: word-at-a-time optimization for 64-bit Little EndianPhilippe Bergheaud2013-10-311-25/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an optimization for the PowerPC in 64-bit little-endian. Bit counting is used in find_zero(), instead of the multiply and shift. It is modelled after Alan Modra's PowerPC LE strlen patch http://sourceware.org/ml/libc-alpha/2013-08/msg00097.html. Signed-off-by: Philippe Bergheaud <felix@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | powerpc/bpf: BPF JIT compiler for 64-bit Little EndianPhilippe Bergheaud2013-10-314-16/+21
| | | | | | | | | | | | | | | | | | | | | | | | This enables the Berkeley Packet Filter JIT compiler for the PowerPC running in 64bit Little Endian. Signed-off-by: Philippe Bergheaud <felix@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | powerpc: Only save/restore SDR1 if in hypervisor modeDan Streetman2013-10-311-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, when not in hypervisor mode the kernel Oopses during suspend or hibernation when accessing the SDR1 register, because it is only available in hypervisor mode. Access to it needs to be protected in BEGIN/END_FW_FTR_SECTION. Signed-off-by: Dan Streetman <ddstreet@ieee.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reported-by: Jimmy Pan <jipan@redhat.com> Tested-by: Jimmy Pan <jipan@redhat.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | powerpc/pmu: Fix ADB_PMU_LED_IDE dependenciesChristian Kujau2013-10-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for quite some time the following is printed (twice) after doing "make oldconfig": [...] scripts/kconfig/conf --oldconfig Kconfig warning: (ADB_PMU_LED_IDE) selects LEDS_TRIGGER_IDE_DISK which has unmet direct dependencies (NEW_LEDS && IDE_GD_ATA && LEDS_TRIGGERS) warning: (ADB_PMU_LED_IDE) selects LEDS_TRIGGER_IDE_DISK which has unmet direct dependencies (NEW_LEDS && IDE_GD_ATA && LEDS_TRIGGERS) The following patch causes ADB_PMU_LED to depend on IDE_GD_ATA, so that the options above are only available when IDE_GD_ATA is actually selected and thus eliminates the warning. Signed-off-by: Christian Kujau <lists@nerdbynature.de> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | powerpc/nvram: Fix endian issue when using the partition lengthCedric Le Goater2013-10-311-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When reading partitions, the length has to be translated from big endian to the endian order of the host. Similarly, when writing partitions, the length needs to be in big endian order. The userspace tool 'nvram' needs a similar fix as it is reading and writing partitions through /dev/nram : http://sourceforge.net/p/powerpc-utils/mailman/message/31571277/ Signed-off-by: Cedric Le Goater <clg@fr.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | powerpc/nvram: Fix endian issue when reading the NVRAM sizeCedric Le Goater2013-10-312-4/+4
| | | | | | | | | | | | | | | Signed-off-by: Cedric Le Goater <clg@fr.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * | powerpc/nvram: Scan partitions only onceCedric Le Goater2013-10-311-3/+3
| |/ | | | | | | | | | | | | | | | | | | nvram_scan_partitions() is called twice when initializing the "lnx,oops-log" partition and the "ibm,rtas-log" partition. This fills the partition list with duplicate entries. This patch moves the partition scan in the init routine pseries_nvram_init_log_partitions() which is called only once. Signed-off-by: Cedric Le Goater <clg@fr.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc/powernv: Code update interfaceVasant Hegde2013-10-305-1/+683
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code update interface for powernv platform. This provides sysfs interface to pass new image, validate, update and commit images. This patch includes: - Below OPAL APIs for code update - opal_validate_flash() - opal_manage_flash() - opal_update_flash() - Create below sysfs files under /sys/firmware/opal - image : Interface to pass new FW image - validate_flash : Validate candidate image - manage_flash : Commit/Reject operations - update_flash : Flash new candidate image Updating Image: "update_flash" is an interface to indicate flash new FW. It just passes image SG list to FW. Actual flashing is done during system reboot time. Note: - SG entry format: I have kept version number to keep this list similar to what PAPR is defined. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc/powernv: Create opal sysfs directoryVasant Hegde2013-10-302-0/+22
| | | | | | | | | | | | | | | | Create /sys/firmware/opal directory. We wil use this interface to fetch opal error logs, firmware update, etc. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc: Add VMX optimised xor for RAID5Anton Blanchard2013-10-303-0/+247
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a VMX optimised xor, used primarily for RAID5. On a POWER7 blade this is a decent win: 32regs : 17932.800 MB/sec altivec : 19724.800 MB/sec The bigger gain is when the same test is run in SMT4 mode, as it would if there was a lot of work going on: 8regs : 8377.600 MB/sec altivec : 15801.600 MB/sec I tested this against an array created without the patch, and also verified it worked as expected on a little endian kernel. [ Fix !CONFIG_ALTIVEC build -- BenH ] Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc/kexec: kexec_sequence() is in misc_64.SGeert Uytterhoeven2013-10-301-1/+1
| | | | | | | | | | | | | | | | Correct reference to the location of the kexec_sequence() assembly helper. There never was a kexec_stub.S in mainline. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc: Use 32 bit loads and stores when operating on condition register valuesAnton Blanchard2013-10-302-6/+6
| | | | | | | | | | | | | | | | The condition register (CR) is a 32 bit quantity so we should use 32 bit loads and stores. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc: Enable virtio on ppc64 and pseries configsAnton Blanchard2013-10-302-0/+12
| | | | | | | | | | Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc: Enable multipath modules on ppc64 and pseriesAnton Blanchard2013-10-302-0/+12
| | | | | | | | | | | | | | | | Enable a few modules required to boot on a POWER multipath box. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc: sync ppc64, ppc64e and pseries configsAnton Blanchard2013-10-303-30/+8
| | | | | | | | | | | | | | Run savedefconfig over the ppc64, ppc64e and pseries config Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc: Use -mcpu=power7 on ppc64 little endian buildsAnton Blanchard2013-10-301-4/+5
| | | | | | | | | | | | | | | | Using -mcpu=power7 allows gcc to use a number of new instructions including 64 bit byte reversed loads. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc/pseries: Fix dedicated processor partition detectionAnton Blanchard2013-10-301-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit f13c13a00512 (powerpc: Stop using non-architected shared_proc field in lppaca) fixed a potential issue with shared/dedicated partition detection. The old method of detection relied on an unarchitected field (shared_proc), and this patch switched to using something architected (a non zero yield_count). Unfortunately the assertion in the Linux header that yield_count is only non zero on shared processor partitions is not true. It turns out dedicated processor partitions can increment yield_count and as such we falsely detect dedicated partitions as shared. Fix the comment, and switch back to using the old method. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc: Fix Unaligned LE Floating Point Loads and StoresTom Musta2013-10-301-12/+40
| | | | | | | | | | | | | | | | | | | | This patch addresses unaligned single precision floating point loads and stores in the single-step code. The old implementation improperly treated an 8 byte structure as an array of two 4 byte words, which is a classic little endian bug. Signed-off-by: Tom Musta <tmusta@gmail.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc: Fix Unaligned Loads and StoresTom Musta2013-10-301-0/+45
| | | | | | | | | | | | | | | | | | | | | | This patch modifies the unaligned access routines of the sstep.c module so that it properly reverses the bytes of storage operands in the little endian kernel kernel. This is implemented by breaking an unaligned little endian access into a combination of single byte accesses plus an overal byte reversal operation. Signed-off-by: Tom Musta <tmusta@gmail.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc: Enable Little Endian Alignment Handler for Float Pair InstructionsTom Musta2013-10-301-6/+0
| | | | | | | | | | | | | | | | | | This patch enables alignment handling for the load/store floating point pair instructions (lfdp, lfdpx, stfdp, stfdpx). The handler routine is properly coded and only needs to be enabled. Signed-off-by: Tom Musta <tmusta@gmail.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc: Fix Handler of Unaligned Load/Store StringsTom Musta2013-10-301-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The alignment handler is incorrect for unaligned string instructions in little endian mode. These instructions access data as arrays of bytes and thus are endian neutral. However, the routine also handles the load/store multiple instructions, which are NOT endian neutral. This patch toggles the byte swapping flag for the string instructions in little endian builds. This effectively disables the byte swapping logic. Signed-off-by: Tom Musta <tmusta@gmail.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc/pseries: Fix endian issues in pseries iommu codeAnton Blanchard2013-10-301-29/+30
| | | | | | | | | | Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc: Fix little endian issue in OF PCI scanAnton Blanchard2013-10-301-2/+2
| | | | | | | | | | | | | | | | This issue was causing the QEMU emulated USB device to fail dring PCI probe. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc/vio: use strcpy in modalias_showPrarit Bhargava2013-10-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | Commit e82b89a6f19bae73fb064d1b3dd91fcefbb478f4 used strcat instead of strcpy which can result in an overflow of newlines on the buffer. Signed-off-by: Prarit Bhargava Cc: benh@kernel.crashing.org Cc: ben@decadent.org.uk Cc: stable@vger.kernel.org Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc: Fix 64K page size support for PPC44xAlistair Popple2013-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PPC44x supports page sizes other than 4K however when 64K page sizes are selected compilation fails. This is due to a change in the definition of pgtable_t introduced by the following patch: commit 5c1f6ee9a31cbdac90bbb8ae1ba4475031ac74b4 Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> powerpc: Reduce PTE table memory wastage The above patch only implements the new layout for PPC64 so it doesn't compile for PPC32 with a 64K page size. Ideally we should implement the same layout for PPC32 however for the meantime this patch reverts the definition of pgtable_t for PPC32. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc: FA_DUMP depends on KEXECMichael Ellerman2013-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you try and build the FA_DUMP code with CONFIG_KEXEC=n, you see errors such as the following: arch/powerpc/kernel/fadump.c 408:2: error: 'crashing_cpu' undeclared (first use in this function) 410:2: error: implicit declaration of function 'crash_save_vmcoreinfo' 513:22: error: storage size of 'prstatus' isn't known 520:2: error: implicit declaration of function 'elf_core_copy_kernel_regs' 521:36: error: 'KEXEC_CORE_NOTE_NAME' undeclared (first use in this function) 624:49: error: 'note_buf_t' undeclared (first use in this function) 872:2: error: implicit declaration of function 'paddr_vmcoreinfo_note' 874:18: error: 'vmcoreinfo_max_size' undeclared (first use in this function) This is because although FA_DUMP doesn't use kexec as the actual reboot mechanism, it does use parts of the kexec code to assemble/disassemble the crash image. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc: Fix a typo in comments of va to pa conversionVaishnavi Bhat2013-10-301-1/+1
| | | | | | | | | | | | | | | | This patch fixes typo in comments virtual to physical address conversion. Signed-off-by: Vaishnavi Bhat <vaishnavi@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc: Move local setup.h declarations to arch includesRobert Jennings2013-10-309-23/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the few declarations from arch/powerpc/kernel/setup.h into arch/powerpc/include/asm/setup.h. This resolves a sparse warning for arch/powerpc/mm/numa.c which defines do_init_bootmem() but can't include the setup.h header in the prior path. Resolves: arch/powerpc/mm/numa.c:998:13: warning: symbol 'do_init_bootmem' was not declared. Should it be static? Signed-off-by: Robert C Jennings <rcj@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc: Fix warnings for arch/powerpc/mm/numa.cRobert Jennings2013-10-301-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simple fixes for sparse warnings in this file. Resolves: arch/powerpc/mm/numa.c:198:24: warning: Using plain integer as NULL pointer arch/powerpc/mm/numa.c:1157:5: warning: symbol 'hot_add_node_scn_to_nid' was not declared. Should it be static? arch/powerpc/mm/numa.c:1238:28: warning: Using plain integer as NULL pointer arch/powerpc/mm/numa.c:1538:6: warning: symbol 'topology_schedule_update' was not declared. Should it be static? Signed-off-by: Robert C Jennings <rcj@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc/boot: Don't change link address for OF-based platformsPaul Mackerras2013-10-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit c55aef0e5bc6 ("powerpc/boot: Change the load address for the wrapper to fit the kernel") adjusts the wrapper address unnecessarily for platforms that use arch/powerpc/boot/of.c, since the code there allocates space for the kernel wherever it can find it and doesn't necessarily load the kernel at address 0. Changing the link address is actually harmful since it can cause the zImage to overlap with Open Firmware and thus fail to boot. To fix this, we set make_space to n for all of the platforms that use of.o. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * powerpc: Add includes to fix powernv/rng.c buildStephen Rothwell2013-10-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Caused by commit a4da0d50b2a0 ("powerpc: Implement arch_get_random_long/int() for powernv") from the powerpc tree interacting with commit b5b4bb3f6a11 ("of: only include prom.h on sparc") from the dt-rh tree. I added this merge fix patch (which will need to be sent to Linus when these two trees get merged, or could be applied now to the powerpc tree): [ Also add linux/smp.h to get cpu_to_chip_id -- BenH ] Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| * Merge remote-tracking branch 'scott/next' into nextBenjamin Herrenschmidt2013-10-3051-1081/+964
| |\ | | | | | | | | | | | | | | | | | | Highlights include corenet board file consolidation, the ability to run userspaces with lwsync on e500v1/v2, some cleanup patches that other KVM patches will build on, support for stripped-down e6500 emulation targets, and some fixes of minor longstanding issues.
OpenPOWER on IntegriCloud