aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-10-11hwrng: Return errors to upper levels in pseries-rng.cMichael Ellerman1-3/+11
We don't expect to get errors from the hypervisor when reading the rng, but if we do we should pass the error up to the hwrng driver. Otherwise the hwrng driver will continue calling us forever. Signed-off-by: Michael Ellerman <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc: Added __cmpdi2 for signed 64bit comparisionBharat Bhushan2-0/+16
This was missing on powerpc and I am getting compilation error drivers/vfio/pci/vfio_pci_rdwr.c:193: undefined reference to `__cmpdi2' drivers/vfio/pci/vfio_pci_rdwr.c:193: undefined reference to `__cmpdi2' Signed-off-by: Bharat Bhushan <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc: Fix section mismatch warning in free_lppacasVladimir Murzin1-3/+3
While cross-building for PPC64 I've got bunch of WARNING: arch/powerpc/kernel/built-in.o(.text.unlikely+0x2d2): Section mismatch in reference from the function .free_lppacas() to the variable .init.data:lppaca_size The function .free_lppacas() references the variable __initdata lppaca_size. This is often because .free_lppacas lacks a __initdata annotation or the annotation of lppaca_size is wrong. Fix it by using proper annotation for free_lppacas. Additionally, annotate {allocate,new}_llpcas properly. Signed-off-by: Vladimir Murzin <[email protected]> Acked-by: Michael Ellerman <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc/ppc64: Remove the unneeded load of ti_flags in resume_kernelKevin Hao1-3/+1
We already got the value of current_thread_info and ti_flags and store them into r9 and r4 respectively before jumping to resume_kernel. So there is no reason to reload them again. Signed-off-by: Kevin Hao <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc/8xx/tqm8xx: Fix incorrect placement of __initdata tagBartlomiej Zolnierkiewicz1-2/+2
__initdata tag should be placed between the variable name and equal sign for the variable to be placed in the intended .init.data section. Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc/legacy_serial: Fix incorrect placement of __initdata tagBartlomiej Zolnierkiewicz1-1/+1
__initdata tag should be placed between the variable name and equal sign for the variable to be placed in the intended .init.data section. Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc/mpic: Disable preemption when calling mpic_processor_id()Scott Wood1-1/+7
Otherwise, we get a debug traceback due to the use of smp_processor_id() (or get_paca()) inside hard_smp_processor_id(). mpic_host_map() is just looking for a default CPU, so it doesn't matter if we migrate after getting the CPU ID. Signed-off-by: Scott Wood <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc: Work around little endian gcc bugAnton Blanchard1-1/+1
Temporarily work around an ICE we are seeing while building in little endian mode: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57134 Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc: Don't set HAVE_EFFICIENT_UNALIGNED_ACCESS on little endian buildsAnton Blanchard1-1/+1
POWER7 takes alignment exceptions on some unaligned addresses, so disable HAVE_EFFICIENT_UNALIGNED_ACCESS. This fixes an early boot issue in the printk code. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc: Add ability to build little endian kernelsIan Munsie4-4/+31
This patch allows the kbuild system to successfully compile a kernel for the little endian PowerPC64 architecture. A subsequent patch will add the CONFIG_CPU_LITTLE_ENDIAN kernel config option which must be set to build such a kernel. If cross compiling, CROSS_COMPILE must point to a suitable toolchain (compiled for the powerpc64le-linux and powerpcle-linux targets). Signed-off-by: Ian Munsie <[email protected]> Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11KVM: PPC: Disable KVM on little endian buildsAnton Blanchard1-0/+1
There are a number of KVM issues with little endian builds. We are working on fixing them, but in the meantime disable it. Signed-off-by: Anton Blanchard <[email protected]> Cc: Alexander Graf <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11tty/hvc_opal: powerpc: Make OPAL HVC device tree accesses endian safeBenjamin Herrenschmidt1-2/+2
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc/hvsi: Fix endian issues in HVSI driverBenjamin Herrenschmidt2-21/+20
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc/powernv: Fix some PCI sparse errors and one LE bugAnton Blanchard5-19/+19
pnv_pci_setup_bml_iommu was missing a byteswap of a device tree property. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc/powernv: More little endian issues in OPAL RTC driverAnton Blanchard2-11/+12
Sparse caught an issue where opal_set_rtc_time was incorrectly byteswapping. Also fix a number of sparse warnings. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc/powernv: Don't register exception handlers in little endian modeBenjamin Herrenschmidt1-0/+2
The powernv exception handlers are not ready to take exceptions in little endian mode, so disable them. Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc/powernv: Fix OPAL entry and exit in little endian modeBenjamin Herrenschmidt1-1/+8
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc/powernv: Fix endian issues in OPAL console and udbg backendBenjamin Herrenschmidt2-16/+20
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc/powernv: Fix endian issues in powernv PCI codeBenjamin Herrenschmidt2-28/+30
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc/powernv: Make OPAL NVRAM device tree accesses endian safeBenjamin Herrenschmidt1-2/+2
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc/powernv: Fix endian issues in OPAL ICS backendBenjamin Herrenschmidt1-8/+9
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc/powernv: Fix endian issues in OPAL RTC driverBenjamin Herrenschmidt1-0/+7
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc: Little endian sparse clean up for ↵Alistair Popple1-2/+2
arch/powerpc/platforms/powernv/pci-ioda.c Signed-off-by: Alistair Popple <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc: Little endian fix for arch/powerpc/platforms/powernv/pci-p5ioc2.cAlistair Popple1-2/+2
Signed-off-by: Alistair Popple <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc: Little endian fix for arch/powerpc/platforms/powernv/pci.cAlistair Popple1-4/+5
Signed-off-by: Alistair Popple <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc: Little endian fixes for platforms/powernv/opal.cAlistair Popple1-1/+1
Signed-off-by: Alistair Popple <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc: uname should return ppc64le/ppcle on little endian buildsAnton Blanchard1-2/+11
We need to distinguish between big endian and little endian environments, so fix uname to return the right thing. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc: Use generic memcpy code in little endianAnton Blanchard3-3/+12
We need to fix some endian issues in our memcpy code. For now just enable the generic memcpy routine for little endian builds. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc: Use generic checksum code in little endianAnton Blanchard4-2/+17
We need to fix some endian issues in our checksum code. For now just enable the generic checksum routines for little endian builds. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc: Handle VSX alignment faults in little endian modeAnton Blanchard1-8/+33
Things are complicated by the fact that VSX elements are big endian ordered even in little endian mode. 8 byte loads and stores also write to the top 8 bytes of the register. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc: Add little endian support to alignment handlerAnton Blanchard1-30/+63
Handle most unaligned load and store faults in little endian mode. Strings, multiples and VSX are not supported. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc: Alignment handler shouldn't access VSX registers with TS_FPRAnton Blanchard1-1/+1
The TS_FPR macro selects the FPR component of a VSX register (the high doubleword). emulate_vsx is using this macro to get the address of the associated VSX register. This happens to work on big endian, but fails on little endian. Replace it with an explicit array access. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc: Remove hard coded FP offsets in alignment handlerAnton Blanchard1-2/+2
The alignment handler assumes big endian ordering when selecting the low word of a 64bit floating point value. Use the existing union which works in both little and big endian. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc: Remove open coded byte swap macro in alignment handlerAnton Blanchard1-24/+12
Use swab64/32/16 instead of open coding it. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc: Endian safe trampolineBenjamin Herrenschmidt3-17/+53
Create a trampoline that works in either endian and flips to the expected endian. Use it for primary and secondary thread entry as well as RTAS and OF call return. Credit for finding the magic instruction goes to Paul Mackerras Signed-off-by: Benjamin Herrenschmidt <[email protected]> Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc: Include the appropriate endianness headerIan Munsie1-0/+4
This patch will have powerpc include the appropriate generic endianness header depending on what the compiler reports. Signed-off-by: Ian Munsie <[email protected]> Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc: Reset MSR_LE on signal entryAnton Blanchard2-2/+4
We always take signals in big endian which is wrong. Signals should be taken in native endian. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc: Set MSR_LE bit on little endian buildsAnton Blanchard1-1/+6
We need to set MSR_LE in kernel and userspace for little endian builds Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc: Add little endian support for word-at-a-time functionsAnton Blanchard1-0/+71
The powerpc word-at-a-time functions are big endian specific. Bring in the x86 version in order to support little endian builds. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc: Support endian agnostic MMIOIan Munsie1-18/+49
This patch maps the MMIO functions for 32bit PowerPC to their appropriate instructions depending on CPU endianness. The macros used to create the corresponding inline functions are also renamed by this patch. Previously they had BE or LE in their names which was misleading - they had nothing to do with endianness, but actually created different instruction forms so their new names reflect the instruction form they are creating (D-Form and X-Form). Little endian 64bit PowerPC is not supported, so the lack of mappings (and corresponding breakage) for that case is intentional to bring the attention of anyone doing a 64bit little endian port. 64bit big endian is unaffected. [ Added 64 bit versions - Anton ] Signed-off-by: Ian Munsie <[email protected]> Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc: Little endian builds double word swap VSX state during context ↵Anton Blanchard2-4/+20
save/restore The elements within VSX loads and stores are big endian ordered regardless of endianness. Our VSX context save/restore code uses lxvd2x and stxvd2x which is a 2x doubleword operation. This means the two doublewords will be swapped and we have to perform another swap to undo it. We need to do this on save and restore. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc: PTRACE_PEEKUSR/PTRACE_POKEUSER of FPR registers in little endian buildsAnton Blanchard1-4/+4
FPRs overlap the high 64bits of the first 32 VSX registers. The ptrace FP read/write code assumes big endian ordering and grabs the lowest 64 bits. Fix this by using the TS_FPR macro which does the right thing. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc: Fix offset of FPRs in VSX registers in little endian buildsAnton Blanchard1-2/+10
The FPRs overlap the high doublewords of the first 32 VSX registers. Fix TS_FPROFFSET and TS_VSRLOWOFFSET so we access the correct fields in little endian mode. If VSX is disabled the FPRs are only one doubleword in length so TS_FPROFFSET needs adjusting in little endian. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc: Book 3S MMU little endian supportAnton Blanchard3-42/+46
Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-11powerpc: Fix endian issues in VMX copy loopsAnton Blanchard2-46/+63
Fix the permute loops for little endian. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2013-10-07powerpc/irq: Don't switch to irq stack from softirq stackBenjamin Herrenschmidt1-2/+3
irq_exit() is now called on the irq stack, which can trigger a switch to the softirq stack from the irq stack. If an interrupt happens at that point, we will not properly detect the re-entrancy and clobber the original return context on the irq stack. This fixes it. The side effect is to prevent all nesting from softirq stack to irq stack even in the "safe" case but it's simpler that way and matches what x86_64 does. Reported-by: Cédric Le Goater <[email protected]> Tested-by: Cédric Le Goater <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-10-07Merge branch 'for-linus' of ↵Linus Torvalds13-27/+63
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID fixes from Jiri Kosina: - fix for hidraw reference counting regression, by Manoj Chourasia - fix for minor number allocation for uhid, by David Herrmann - other small unsorted fixes / device ID additions * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: wiimote: fix FF deadlock HID: add Holtek USB ID 04d9:a081 SHARKOON DarkGlider HID: hidraw: close underlying device at removal of last reader HID: roccat: Fix "cannot create duplicate filename" problems HID: uhid: allocate static minor
2013-10-07Merge branch 'stable' of ↵Linus Torvalds9-42/+84
git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile Pull Tile bugfixes from Chris Metcalf: "This fixes some serious issues with PREEMPT support, and a couple of smaller corner-case issues fixed in the last couple of weeks" * 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: arch: tile: re-use kbasename() helper tile: use a more conservative __my_cpu_offset in CONFIG_PREEMPT tile: ensure interrupts disabled for preempt_schedule_irq() tile: change lock initalization in hardwall tile: include: asm: use 'long long' instead of 'u64' for atomic64_t and its related functions
2013-10-07HID: wiimote: fix FF deadlockDavid Herrmann2-12/+32
The input core has an internal spinlock that is acquired during event injection via input_event() and friends but also held during FF callbacks. That means, there is no way to share a lock between event-injection and FF handling. Unfortunately, this is what is required for wiimote state tracking and what we do with state.lock and input->lock. This deadlock can be triggered when using continuous data reporting and FF on a wiimote device at the same time. I takes me at least 30m of stress-testing to trigger it but users reported considerably shorter times (http://bpaste.net/show/132504/) when using some gaming-console emulators. The real problem is that we have two copies of internal state, one in the wiimote objects and the other in the input device. As the input-lock is not supposed to be accessed from outside of input-core, we have no other chance than offloading FF handling into a worker. This actually works pretty nice and also allows to implictly merge fast rumble changes into a single request. Due to the 3-layered workers (rumble+queue+l2cap) this might reduce FF responsiveness. Initial tests were fine so lets fix the race first and if it turns out to be too slow we can always handle FF out-of-band and skip the queue-worker. Cc: <[email protected]> # 3.11+ Reported-by: Thomas Schneider Signed-off-by: David Herrmann <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2013-10-07Merge branch 'for-linus' of ↵Linus Torvalds6-27/+33
git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Martin Schwidefsky: "A couple of bux fixes, notable are the regression with ptrace vs restarting system calls and the patch for kdump to be able to copy from virtual memory" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390: fix system call restart after inferior call s390: Allow vmalloc target buffers for copy_from_oldmem() s390/sclp: properly detect line mode console s390/kprobes: add exrl to list of prohibited opcodes s390/3270: fix return value check in tty3270_resize_work()