aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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()
2013-10-06Linux 3.12-rc4Linus Torvalds1-1/+1
2013-10-06net: Update the sysctl permissions handler to test effective uid/gidEric W. Biederman1-2/+2
Modify the code to use current_euid(), and in_egroup_p, as in done in fs/proc/proc_sysctl.c:test_perm() Cc: [email protected] Reviewed-by: Eric Sandeen <[email protected]> Reported-by: Eric Sandeen <[email protected]> Signed-off-by: "Eric W. Biederman" <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-10-06Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pendingLinus Torvalds8-25/+67
Pull SCSI target fixes from Nicholas Bellinger: "Here are the outstanding target fixes queued up for v3.12-rc4 code. The highlights include: - Make vhost/scsi tag percpu_ida_alloc() use GFP_ATOMIC - Allow sess_cmd_map allocation failure fallback to use vzalloc - Fix COMPARE_AND_WRITE se_cmd->data_length bug with FILEIO backends - Fixes for COMPARE_AND_WRITE callback recursive failure OOPs + non zero scsi_status bug - Make iscsi-target do acknowledgement tag release from RX context - Setup iscsi-target with extra (cmdsn_depth / 2) percpu_ida tags Also included is a iscsi-target patch CC'ed for v3.10+ that avoids legacy wait_for_task=true release during fast-past StatSN acknowledgement, and two other SRP target related patches that address long-standing issues that are CC'ed for v3.3+. Extra thanks to Thomas Glanzmann for his testing feedback with COMPARE_AND_WRITE + EXTENDED_COPY VAAI logic" * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: iscsi-target; Allow an extra tag_num / 2 number of percpu_ida tags iscsi-target: Perform release of acknowledged tags from RX context iscsi-target: Only perform wait_for_tasks when performing shutdown target: Fail on non zero scsi_status in compare_and_write_callback target: Fix recursive COMPARE_AND_WRITE callback failure target: Reset data_length for COMPARE_AND_WRITE to NoLB * block_size ib_srpt: always set response for task management target: Fall back to vzalloc upon ->sess_cmd_map kzalloc failure vhost/scsi: Use GFP_ATOMIC with percpu_ida_alloc for obtaining tag ib_srpt: Destroy cm_id before destroying QP. target: Fix xop->dbl assignment in target_xcopy_parse_segdesc_02
2013-10-06Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dmaLinus Torvalds3-17/+17
Pull slave-dmaengine fixes from Vinod Koul: "Here is the slave dmanegine fixes. We have the fix for deadlock issue on imx-dma by Michael and Josh's edma config fix along with author change" * 'fixes' of git://git.infradead.org/users/vkoul/slave-dma: dmaengine: imx-dma: fix callback path in tasklet dmaengine: imx-dma: fix lockdep issue between irqhandler and tasklet dmaengine: imx-dma: fix slow path issue in prep_dma_cyclic dma/Kconfig: Make TI_EDMA select TI_PRIV_EDMA edma: Update author email address
2013-10-05Merge branch 'for-linus' of ↵Linus Torvalds6-17/+39
git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull btrfs fixes from Chris Mason: "This is a small collection of fixes, including a regression fix from Liu Bo that solves rare crashes with compression on. I've merged my for-linus up to 3.12-rc3 because the top commit is only meant for 3.12. The rest of the fixes are also available in my master branch on top of my last 3.11 based pull" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: btrfs: Fix crash due to not allocating integrity data for a bioset Btrfs: fix a use-after-free bug in btrfs_dev_replace_finishing Btrfs: eliminate races in worker stopping code Btrfs: fix crash of compressed writes Btrfs: fix transid verify errors when recovering log tree
2013-10-05Merge tag 'gpio-v3.12-2' of ↵Linus Torvalds1-57/+101
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "Two patches for the OMAP driver, dealing with setting up IRQs properly on the device tree boot path" * tag 'gpio-v3.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio/omap: auto-setup a GPIO when used as an IRQ gpio/omap: maintain GPIO and IRQ usage separately
2013-10-05Merge tag 'usb-3.12-rc4' of ↵Linus Torvalds8-13/+29
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are none fixes for various USB driver problems. The majority are gadget/musb fixes, but there are some new device ids in here as well" * tag 'usb-3.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: chipidea: add Intel Clovertrail pci id usb: gadget: s3c-hsotg: fix can_write limit for non-periodic endpoints usb: gadget: f_fs: fix error handling usb: musb: dsps: do not bind to "musb-hdrc" USB: serial: option: Ignore card reader interface on Huawei E1750 usb: musb: gadget: fix otg active status flag usb: phy: gpio-vbus: fix deferred probe from __init usb: gadget: pxa25x_udc: fix deferred probe from __init usb: musb: fix otg default state
2013-10-05Merge tag 'tty-3.12-rc4' of ↵Linus Torvalds2-20/+27
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty fixes from Greg KH: "Here are two tty driver fixes for 3.12-rc4. One fixes the reported regression in the n_tty code that a number of people found recently, and the other one fixes an issue with xen consoles that broke in 3.10" * tag 'tty-3.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: xen/hvc: allow xenboot console to be used again tty: Fix pty master read() after slave closes