Skip to content

Commit

Permalink
origin
Browse files Browse the repository at this point in the history
GIT 08edb33

commit 708f04d
Author: Dave Jones <davej@redhat.com>
Date:   Thu Mar 20 15:03:58 2014 -0600

    block: free q->flush_rq in blk_init_allocated_queue error paths
    
    Commit 7982e90 ("block: fix q->flush_rq NULL pointer crash on
    dm-mpath flush") moved an allocation to blk_init_allocated_queue(), but
    neglected to free that allocation on the error paths that follow.
    
    Signed-off-by: Dave Jones <davej@fedoraproject.org>
    Acked-by: Mike Snitzer <snitzer@redhat.com>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

commit 11d4616
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Thu Mar 20 22:11:17 2014 -0700

    futex: revert back to the explicit waiter counting code
    
    Srikar Dronamraju reports that commit b0c29f7 ("futexes: Avoid
    taking the hb->lock if there's nothing to wake up") causes java threads
    getting stuck on futexes when runing specjbb on a power7 numa box.
    
    The cause appears to be that the powerpc spinlocks aren't using the same
    ticket lock model that we use on x86 (and other) architectures, which in
    turn result in the "spin_is_locked()" test in hb_waiters_pending()
    occasionally reporting an unlocked spinlock even when there are pending
    waiters.
    
    So this reinstates Davidlohr Bueso's original explicit waiter counting
    code, which I had convinced Davidlohr to drop in favor of figuring out
    the pending waiters by just using the existing state of the spinlock and
    the wait queue.
    
    Reported-and-tested-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
    Original-code-by: Davidlohr Bueso <davidlohr@hp.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

commit 7e09e73
Author: Hugh Dickins <hughd@google.com>
Date:   Thu Mar 20 21:52:17 2014 -0700

    mm: fix swapops.h:131 bug if remap_file_pages raced migration
    
    Add remove_linear_migration_ptes_from_nonlinear(), to fix an interesting
    little include/linux/swapops.h:131 BUG_ON(!PageLocked) found by trinity:
    indicating that remove_migration_ptes() failed to find one of the
    migration entries that was temporarily inserted.
    
    The problem comes from remap_file_pages()'s switch from vma_interval_tree
    (good for inserting the migration entry) to i_mmap_nonlinear list (no good
    for locating it again); but can only be a problem if the remap_file_pages()
    range does not cover the whole of the vma (zap_pte() clears the range).
    
    remove_migration_ptes() needs a file_nonlinear method to go down the
    i_mmap_nonlinear list, applying linear location to look for migration
    entries in those vmas too, just in case there was this race.
    
    The file_nonlinear method does need rmap_walk_control.arg to do this;
    but it never needed vma passed in - vma comes from its own iteration.
    
    Reported-and-tested-by: Dave Jones <davej@redhat.com>
    Reported-and-tested-by: Sasha Levin <sasha.levin@oracle.com>
    Signed-off-by: Hugh Dickins <hughd@google.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

commit 8729134
Author: Vaibhav Nagarnaik <vnagarnaik@google.com>
Date:   Thu Feb 13 19:51:48 2014 -0800

    tracing: Fix array size mismatch in format string
    
    In event format strings, the array size is reported in two locations.
    One in array subscript and then via the "size:" attribute. The values
    reported there have a mismatch.
    
    For e.g., in sched:sched_switch the prev_comm and next_comm character
    arrays have subscript values as [32] where as the actual field size is
    16.
    
    name: sched_switch
    ID: 301
    format:
            field:unsigned short common_type;       offset:0;       size:2; signed:0;
            field:unsigned char common_flags;       offset:2;       size:1; signed:0;
            field:unsigned char common_preempt_count;       offset:3;       size:1;signed:0;
            field:int common_pid;   offset:4;       size:4; signed:1;
    
            field:char prev_comm[32];       offset:8;       size:16;        signed:1;
            field:pid_t prev_pid;   offset:24;      size:4; signed:1;
            field:int prev_prio;    offset:28;      size:4; signed:1;
            field:long prev_state;  offset:32;      size:8; signed:1;
            field:char next_comm[32];       offset:40;      size:16;        signed:1;
            field:pid_t next_pid;   offset:56;      size:4; signed:1;
            field:int next_prio;    offset:60;      size:4; signed:1;
    
    After bisection, the following commit was blamed:
    92edca0 tracing: Use direct field, type and system names
    
    This commit removes the duplication of strings for field->name and
    field->type assuming that all the strings passed in
    __trace_define_field() are immutable. This is not true for arrays, where
    the type string is created in event_storage variable and field->type for
    all array fields points to event_storage.
    
    Use __stringify() to create a string constant for the type string.
    
    Also, get rid of event_storage and event_storage_mutex that are not
    needed anymore.
    
    also, an added benefit is that this reduces the overhead of events a bit more:
    
       text    data     bss     dec     hex filename
    8424787 2036472 1302528 11763787         b3804b vmlinux
    8420814 2036408 1302528 11759750         b37086 vmlinux.patched
    
    Link: http://lkml.kernel.org/r/1392349908-29685-1-git-send-email-vnagarnaik@google.com
    
    Cc: Laurent Chavey <chavey@google.com>
    Cc: stable@vger.kernel.org # 3.10+
    Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@google.com>
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

commit 71ca758
Author: Jim Quinlan <jim2101024@gmail.com>
Date:   Wed Nov 27 15:34:50 2013 -0500

    MIPS: Make local_irq_disable macro safe for non-Mipsr2
    
    For non-mipsr2 processors, the local_irq_disable contains an mfc0-mtc0
    pair with instructions inbetween.  With preemption enabled, this sequence
    may get preempted and effect a stale value of CP0_STATUS when executing
    the mtc0 instruction.  This commit avoids this scenario by incrementing
    the preempt count before the mfc0 and decrementing it after the mtc9.
    
    [ralf@linux-mips.org: This patch is sorting out the part that were missed
    by e97c5b6 [MIPS: Make irqflags.h functions preempt-safe for non-mipsr2
    cpus.]  I also re-enabled the inclusion of <asm/asm-offsets.h> at the top
    of <asm/asmmacro.h>].
    
    Signed-off-by: Jim Quinlan <jim2101024@gmail.com>
    Cc: linux-mips@linux-mips.org
    Cc: cernekee@gmail.com
    Patchwork: https://patchwork.linux-mips.org/patch/6164/
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

commit 85d898b
Author: Daniel Kurtz <djkurtz@chromium.org>
Date:   Mon Mar 17 11:28:06 2014 +0800

    drm/exynos: Fix (more) freeing issues in exynos_drm_drv.c
    
    The following commit [0] fixed a use-after-free, but left the subdrv open
    in the error path.
    
    [0] commit 6ca605f
    drm/exynos: Fix freeing issues in exynos_drm_drv.c
    
    Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
    Acked-by: Sachin Kamat <sachin.kamat@linaro.org>
    Signed-off-by: Inki Dae <inki.dae@samsung.com>

commit 8878439
Author: Hugh Dickins <hughd@google.com>
Date:   Tue Mar 18 17:38:38 2014 -0700

    mm: fix bad rss-counter if remap_file_pages raced migration
    
    Fix some "Bad rss-counter state" reports on exit, arising from the
    interaction between page migration and remap_file_pages(): zap_pte()
    must count a migration entry when zapping it.
    
    And yes, it is possible (though very unusual) to find an anon page or
    swap entry in a VM_SHARED nonlinear mapping: coming from that horrid
    get_user_pages(write, force) case which COWs even in a shared mapping.
    
    Signed-off-by: Hugh Dickins <hughd@google.com>
    Tested-by: Sasha Levin sasha.levin@oracle.com>
    Tested-by: Dave Jones davej@redhat.com>
    Cc: Cyrill Gorcunov <gorcunov@gmail.com>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

commit 2eddb70
Author: Andreas Herrmann <andreas.herrmann@caviumnetworks.com>
Date:   Wed Mar 19 23:03:30 2014 +0100

    MIPS: Octeon: Fix warning in of_device_alloc on cn3xxx
    
    Starting with commit 3da5278 (of/irq:
    Rework of_irq_count()) the following warning is triggered on octeon
    cn3xxx:
    
    [    0.887281] WARNING: CPU: 0 PID: 1 at drivers/of/platform.c:171 of_device_alloc+0x228/0x230()
    [    0.895642] Modules linked in:
    [    0.898689] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.14.0-rc7-00012-g9ae51f2-dirty torvalds#41
    [    0.906860] Stack : c8b439581166d96e ffffffff816b0000 0000000040808000 ffffffff81185ddc
    [    0.906860] 	  0000000000000000 0000000000000000 0000000000000000 000000000000000b
    [    0.906860] 	  000000000000000a 000000000000000a 0000000000000000 0000000000000000
    [    0.906860] 	  ffffffff81740000 ffffffff81720000 ffffffff81615900 ffffffff816b0177
    [    0.906860] 	  ffffffff81727d10 800000041f868fb0 0000000000000001 0000000000000000
    [    0.906860] 	  0000000000000000 0000000000000038 0000000000000001 ffffffff81568484
    [    0.906860] 	  800000041f86faa8 ffffffff81145ddc 0000000000000000 ffffffff811873f4
    [    0.906860] 	  800000041f868b88 800000041f86f9c0 0000000000000000 ffffffff81569c9c
    [    0.906860] 	  0000000000000000 0000000000000000 0000000000000000 0000000000000000
    [    0.906860] 	  0000000000000000 ffffffff811205e0 0000000000000000 0000000000000000
    [    0.906860] 	  ...
    [    0.971695] Call Trace:
    [    0.974139] [<ffffffff811205e0>] show_stack+0x68/0x80
    [    0.979183] [<ffffffff81569c9c>] dump_stack+0x8c/0xe0
    [    0.984196] [<ffffffff81145efc>] warn_slowpath_common+0x84/0xb8
    [    0.990110] [<ffffffff81436888>] of_device_alloc+0x228/0x230
    [    0.995726] [<ffffffff814368d8>] of_platform_device_create_pdata+0x48/0xd0
    [    1.002593] [<ffffffff81436a94>] of_platform_bus_create+0x134/0x1e8
    [    1.008837] [<ffffffff81436af8>] of_platform_bus_create+0x198/0x1e8
    [    1.015064] [<ffffffff81436cc4>] of_platform_bus_probe+0xa4/0x100
    [    1.021149] [<ffffffff81100570>] do_one_initcall+0xd8/0x128
    [    1.026701] [<ffffffff816e2a10>] kernel_init_freeable+0x144/0x210
    [    1.032753] [<ffffffff81564bc4>] kernel_init+0x14/0x110
    [    1.037973] [<ffffffff8111bb44>] ret_from_kernel_thread+0x14/0x1c
    
    With this commit the kernel starts mapping the interrupts listed for
    gpio-controller node. irq_domain_ops for CIU (octeon_irq_ciu_map and
    octeon_irq_ciu_xlat) refuse to handle the GPIO lines (returning -EINVAL)
    and this is causing above warning in of_device_alloc().
    
    Modify irq_domain_ops for CIU and CIU2 to "gracefully handle" GPIO
    lines (neither return error code nor call octeon_irq_set_ciu_mapping
    for it). This should avoid the warning.
    
    (As before the real setup for GPIO lines will happen using
    irq_domain_ops of gpio-controller.)
    
    This patch is based on Wei's patch v2 (see
    http://marc.info/?l=linux-mips&m=139511814813247).
    
    Signed-off-by: Andreas Herrmann <andreas.herrmann@caviumnetworks.com>
    Reported-by: Yang Wei <wei.yang@windriver.com>
    Acked-by: David Daney <david.daney@cavium.com>
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/6624/
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

commit b08ac66
Author: Viller Hsiao <villerhsiao@gmail.com>
Date:   Tue Mar 18 15:39:34 2014 +0800

    MIPS: ftrace: Tweak safe_load()/safe_store() macros
    
    Due to name collision in ftrace safe_load and safe_store macros,
    these macros cannot take expressions as operands.
    
    For example, compiler will complain for a macro call like the following:
      safe_store_code(new_code2, ip + 4, faulted);
    
      arch/mips/include/asm/ftrace.h:61:6: note: in definition of macro 'safe_store'
         : [dst] "r" (dst), [src] "r" (src)\
            ^
      arch/mips/kernel/ftrace.c:118:2: note: in expansion of macro 'safe_store_code'
        safe_store_code(new_code2, ip + 4, faulted);
        ^
      arch/mips/kernel/ftrace.c:118:32: error: undefined named operand 'ip + 4'
        safe_store_code(new_code2, ip + 4, faulted);
                                      ^
      arch/mips/include/asm/ftrace.h:61:6: note: in definition of macro 'safe_store'
         : [dst] "r" (dst), [src] "r" (src)\
            ^
      arch/mips/kernel/ftrace.c:118:2: note: in expansion of macro 'safe_store_code'
        safe_store_code(new_code2, ip + 4, faulted);
        ^
    
    This build error is triggered by a467109 [MIPS: ftrace: Fix icache flush
    range error].  Tweak variable naming in those macros to allow flexible
    operands.
    
    Signed-off-by: Viller Hsiao <villerhsiao@gmail.com>
    Cc: linux-mips@linux-mips.org
    Cc: rostedt@goodmis.org
    Cc: fweisbec@gmail.com
    Cc: mingo@redhat.com
    Cc: Qais.Yousef@imgtec.com
    Patchwork: https://patchwork.linux-mips.org/patch/6622/
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

commit 749d322
Author: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Date:   Wed Mar 19 12:59:39 2014 +0000

    ALSA: compress: Pass through return value of open ops callback
    
    The snd_compr_open function would always return 0 even if the compressed
    ops open function failed, obviously this is incorrect. Looks like this
    was introduced by a small typo in:
    
    commit a0830db
    ALSA: Add a reference counter to card instance
    
    This patch returns the value from the compressed op as it should.
    
    Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
    Acked-by: Vinod Koul <vinod.koul@intel.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>

commit 4fe2169
Author: Rafał Miłecki <zajec5@gmail.com>
Date:   Thu Feb 13 17:48:12 2014 +0100

    MIPS: BCM47XX: Check all (32) GPIOs when looking for a pin
    
    Broadcom boards support 32 GPIOs and NVRAM may have entires for higher
    ones too. Example:
    gpio23=wombo_reset
    
    Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
    Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
    Cc: linux-mips@linux-mips.org
    Cc: Rafał Miłecki <zajec5@gmail.com>
    Patchwork: https://patchwork.linux-mips.org/patch/6547/
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

commit 0f4706d
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Mar 18 14:50:50 2014 +0200

    drm/i915: Disable stolen memory when DMAR is active
    
    We have reports of heavy screen corruption if we try to use the stolen
    memory reserved by the BIOS whilst the DMA-Remapper is active. This
    quirk may be only specific to a few machines or BIOSes, but first lets
    apply the big hammer and always disable use of stolen memory when DMAR
    is active.
    
    v2 by Jani: Rebase on -fixes, only look at intel_iommu_gfx_mapped.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68535
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Cc: stable@vger.kernel.org
    Signed-off-by: Jani Nikula <jani.nikula@intel.com>

commit 8259383
Author: Jani Nikula <jani.nikula@intel.com>
Date:   Mon Mar 17 15:20:59 2014 +0200

    Revert "drm/i915: don't touch the VDD when disabling the panel"
    
    This reverts
    commit dff392d
    Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
    Date:   Fri Dec 6 17:32:41 2013 -0200
    
        drm/i915: don't touch the VDD when disabling the panel
    
    which didn't take into account
    
    commit 6cb4983
    Author: Daniel Vetter <daniel.vetter@ffwll.ch>
    Date:   Sun May 20 17:14:50 2012 +0200
    
        drm/i915: enable vdd when switching off the eDP panel
    
    and
    
    commit 35a3855
    Author: Daniel Vetter <daniel.vetter@ffwll.ch>
    Date:   Sun Aug 12 22:17:14 2012 +0200
    
        drm/i915: reorder edp disabling to fix ivb MacBook Air
    
    Unsurprisingly, various MacBooks failed.
    
    Effectively the same has already been done in drm-intel-next-queued.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74628
    Tested-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
    Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
    Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: Jani Nikula <jani.nikula@intel.com>

commit 3eb59ec
Author: Li Zefan <lizefan@huawei.com>
Date:   Tue Mar 18 17:02:36 2014 +0800

    cgroup: fix a failure path in create_css()
    
    If online_css() fails, we should remove cgroup files belonging
    to css->ss.
    
    Signed-off-by: Li Zefan <lizefan@huawei.com>
    Signed-off-by: Tejun Heo <tj@kernel.org>

commit 707d4ee
Author: Bjorn Helgaas <bhelgaas@google.com>
Date:   Tue Mar 18 14:26:12 2014 -0600

    Revert "[PATCH] Insert GART region into resource map"
    
    This reverts commit 56dd669, which makes the GART visible in
    /proc/iomem.  This fixes a regression: e501b3d ("agp: Support 64-bit
    APBASE") exposed an existing problem with a conflict between the GART
    region and a PCI BAR region.
    
    The GART addresses are bus addresses, not CPU addresses, and therefore
    should not be inserted in iomem_resource.
    
    On many machines, the GART region is addressable by the CPU as well as by
    an AGP master, but CPU addressability is not required by the spec.  On some
    of these machines, the GART is mapped by a PCI BAR, and in that case, the
    PCI core automatically inserts it into iomem_resource, just as it does for
    all BARs.
    
    Inserting it here means we'll have a conflict if the PCI core later tries
    to claim the GART region, so let's drop the insertion here.
    
    The conflict indirectly causes X failures, as reported by Jouni in the
    bugzilla below.  We detected the conflict even before e501b3d, but
    after it the AGP code (fix_northbridge()) uses the PCI resource (which is
    zeroed because of the conflict) instead of reading the BAR again.
    
    Conflicts:
    	arch/x86_64/kernel/aperture.c
    
    Fixes: e501b3d agp: Support 64-bit APBASE
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=72201
    Reported-and-tested-by: Jouni Mettälä <jtmettala@gmail.com>
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

commit 3055644
Author: Clemens Ladisch <clemens@ladisch.de>
Date:   Tue Mar 18 09:31:18 2014 +0100

    ALSA: oxygen: Xonar DG(X): fix Stereo Upmixing regression
    
    The code introduced in commit 1f91ecc ("ALSA: oxygen: modify
    adjust_dg_dac_routing function") accidentally disregarded the old value
    of the playback routing register, so it broke the "Stereo Upmixing"
    mixer control.
    
    The unmuted parts of the channel routing are the same for all settings
    of the output destination, so it suffices to revert that part of the
    patch.
    
    Fixes: 1f91ecc ('ALSA: oxygen: modify adjust_dg_dac_routing function')
    Tested-by: Roman Volkov <v1ron@mail.ru>
    Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>

commit e4362d1
Author: Alex Smith <alex.smith@imgtec.com>
Date:   Tue Jan 21 11:22:35 2014 +0000

    MIPS: Fix possible build error with transparent hugepages enabled
    
    If CONFIG_TRANSPARENT_HUGEPAGE is enabled, but CONFIG_HUGETLB_PAGE is not,
    it is possible to end up with a configuration that fails to build with the
    following error:
    
    include/linux/huge_mm.h:125:2: error: #error "hugepages can't be allocated by the buddy allocator"
    
    This is due to CONFIG_FORCE_MAX_ZONEORDER defaulting to 11. It already has
    ranges that change the valid values when HUGETLB_PAGE is enabled, but this
    is not done for TRANSPARENT_HUGEPAGE. Fix by changing the HUGETLB_PAGE
    dependencies to MIPS_HUGE_TLB_SUPPORT, which includes both
    TRANSPARENT_HUGEPAGE and HUGETLB_PAGE.
    
    Signed-off-by: Alex Smith <alex.smith@imgtec.com>
    Reviewed-by: Markos Chandras <markos.chandras@imgtec.com>
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/6391/
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

commit 27410e8
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Thu Jan 30 17:58:38 2014 +0100

    drm: Fix use-after-free in the shadow-attache exit code
    
    This regression has been introduced in
    
    commit b3f2333
    Author: Daniel Vetter <daniel.vetter@ffwll.ch>
    Date:   Wed Dec 11 11:34:31 2013 +0100
    
        drm: restrict the device list for shadow attached drivers
    
    Reported-by: Dave Jones <davej@redhat.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 06e2e88
Author: Paul Burton <paul.burton@imgtec.com>
Date:   Fri Feb 14 17:55:18 2014 +0000

    MIPS: mark O32+FP64 experimental for now
    
    Commit 597ce17 "MIPS: Support for 64-bit FP with O32 binaries"
    introduced support for setting Status.FR=1 for O32 binaries with the
    EF_MIPS_FP64 ELF header flag set. Whilst this flag is currently
    supported by binutils it does introduce an ABI break within userland.
    Objects built with EF_MIPS_FP64 cannot be safely linked with those built
    without it since code in either object may assume behaviour specific to
    a value of FR.
    
    More recently there has been discussion around avoiding further
    fragmentation of the O32 ABI whilst still allowing the use of FR=1 and
    features such as MSA which depend upon it. Details of the plan to allow
    this are still being worked on, and whilst the kernel will need the
    ability to handle FR=1 with O32 tasks it is unclear what else it may
    need to provide to a userland which seeks to avoid another ABI break. In
    order to prevent the proliferation of userland which may rely upon the
    current EF_MIPS_FP64 behaviour this patch marks the kernel support for
    it experimental & disables it by default. Under current proposals it is
    likely that this support can simply be enabled again later, but possibly
    after the introduction of further interfaces with userland and support
    for the MIPS R5 UFR feature.
    
    Signed-off-by: Paul Burton <paul.burton@imgtec.com>
    Cc: Matthew Fortune <matthew.fortune@imgtec.com>
    Cc: linux-mips@linux-mips.org
    Cc: Paul Burton <paul.burton@imgtec.com>
    Patchwork: https://patchwork.linux-mips.org/patch/6549/
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

commit a467109
Author: Viller Hsiao <villerhsiao@gmail.com>
Date:   Sat Feb 22 15:46:49 2014 +0800

    MIPS: ftrace: Fix icache flush range error
    
    In 32-bit mode, the start address passed to flush_icache_range is
    shifted by 4 bytes before the second safe_store_code() call.
    
    This causes system crash from time to time because the first 4 bytes
    might not be flushed properly. This bug exists since linux-3.8.
    
    Also remove obsoleted comment while at it.
    
    Signed-off-by: Viller Hsiao <villerhsiao@gmail.com>
    Cc: linux-mips@linux-mips.org
    Cc: rostedt@goodmis.org
    Cc: fweisbec@gmail.com
    Cc: mingo@redhat.com
    Cc: Qais.Yousef@imgtec.com
    Patchwork: https://patchwork.linux-mips.org/patch/6586/
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

commit 86ca57b
Author: Lars Persson <lars.persson@axis.com>
Date:   Mon Mar 17 12:14:13 2014 +0100

    MIPS: Fix syscall tracing interface
    
    Fix pointer computation for stack-based arguments.
    
    Signed-off-by: Lars Persson <larper@axis.com>
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/6620/
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

commit a8031d2
Author: Markos Chandras <markos.chandras@imgtec.com>
Date:   Wed Jan 22 14:39:57 2014 +0000

    MIPS: asm: syscall: Fix copying system call arguments
    
    The syscall_get_arguments function expects the arguments to be copied
    to the '*args' argument but instead a local variable was used to hold
    the system call argument. As a result of which, this variable was
    never passed to the filter and any filter testing the system call
    arguments would fail. This is fixed by passing the '*args' variable
    as the destination memory for the system call arguments.
    
    Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
    Reviewed-by: Paul Burton <paul.burton@imgtec.com>
    Reviewed-by: James Hogan <james.hogan@imgtec.com>
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/6402/
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

commit 7f02c46
Author: Colin Ian King <colin.king@canonical.com>
Date:   Mon Feb 10 18:42:57 2014 +0000

    MIPS: Octeon: Fix fall through on bar type OCTEON_DMA_BAR_TYPE_SMALL
    
    Bar type OCTEON_DMA_BAR_TYPE_SMALL assigns lo and hi addresses and
    then falls through to OCTEON_DMA_BAR_TYPE_BIG that re-assignes lo and
    hi addresses with totally different values. Add a break so we don't
    fall through.
    
    Signed-off-by: Colin Ian King <colin.king@canonical.com>
    Acked-by: David Daney <ddaney@caviumnetworks.com>
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/6529/
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

commit b616365
Author: Huacai Chen <chenhc@lemote.com>
Date:   Fri Feb 7 22:31:33 2014 +0800

    MIPS: FPU: Fix conflict of register usage
    
    In _restore_fp_context/_restore_fp_context32, t0 is used for both
    CP0_Status and CP1_FCSR. This is a mistake and cause FP exeception on
    boot, so fix it.
    
    Signed-off-by: Huacai Chen <chenhc@lemote.com>
    Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
    Tested-by: Andreas Barth <aba@ayous.org>
    Cc: John Crispin <john@phrozen.org>
    Cc: Steven J. Hill <Steven.Hill@imgtec.com>
    Cc: Aurelien Jarno <aurelien@aurel32.net>
    Cc: linux-mips@linux-mips.org
    Cc: Fuxin Zhang <zhangfx@lemote.com>
    Cc: Zhangjin Wu <wuzhangjin@gmail.com>
    Patchwork: https://patchwork.linux-mips.org/patch/6507/
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

commit f5868f0
Author: Paul Bolle <pebolle@tiscali.nl>
Date:   Sun Feb 9 14:32:25 2014 +0100

    MIPS: Replace CONFIG_MIPS64 and CONFIG_MIPS32_R2
    
    Commit 597ce17 ("MIPS: Support for 64-bit FP with O32 binaries")
    introduced references to two undefined Kconfig macros. CONFIG_MIPS32_R2
    should clearly be replaced with CONFIG_CPU_MIPS32_R2. And CONFIG_MIPS64
    should be replaced with CONFIG_64BIT.
    
    Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/6522/
    Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

commit 6b5625b
Author: Simon Wood <simon@mungewell.org>
Date:   Thu Mar 13 12:42:03 2014 -0600

    HID: hid-lg4ff: Support new version of G27
    
    It has been reported that there is a new hardware version of the G27
    in the 'wild'. This patch add's this new revision so that it can be
    sent the command to switch to native mode.
    
    Reported-by: "Ivan Baldo" <ibaldo@adinet.com.uy>
    Tested-by: "evilcow" <evilcow93@yahoo.com>
    Signed-off-by: Simon Wood <simon@mungewell.org>
    Signed-off-by: Jiri Kosina <jkosina@suse.cz>

commit e724f08
Author: Paul Mackerras <paulus@samba.org>
Date:   Thu Mar 13 20:02:48 2014 +1100

    KVM: PPC: Book3S HV: Fix register usage when loading/saving VRSAVE
    
    Commit 595e4f7 ("KVM: PPC: Book3S HV: Use load/store_fp_state
    functions in HV guest entry/exit") changed the register usage in
    kvmppc_save_fp() and kvmppc_load_fp() but omitted changing the
    instructions that load and save VRSAVE.  The result is that the
    VRSAVE value was loaded from a constant address, and saved to a
    location past the end of the vcpu struct, causing host kernel
    memory corruption and various kinds of host kernel crashes.
    
    This fixes the problem by using register r31, which contains the
    vcpu pointer, instead of r3 and r4.
    
    Signed-off-by: Paul Mackerras <paulus@samba.org>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

commit a5b0ccb
Author: Paul Mackerras <paulus@samba.org>
Date:   Thu Mar 13 20:02:02 2014 +1100

    KVM: PPC: Book3S HV: Remove bogus duplicate code
    
    Commit 7b49041 ("KVM: PPC: Book3S HV: Add new state for
    transactional memory") incorrectly added some duplicate code to the
    guest exit path because I didn't manage to clean up after a rebase
    correctly.  This removes the extraneous material.  The presence of
    this extraneous code causes host crashes whenever a guest is run.
    
    Signed-off-by: Paul Mackerras <paulus@samba.org>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

commit 5c673b6
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Fri Mar 7 20:34:46 2014 +0100

    drm/i915: Don't enable display error interrupts from the start
    
    We need to enable interrupt processing before all the modeset
    state is set up. But that means we can fall over when we get a pipe
    underrun. This shouldn't happen as long as the bios works correctly
    but as usual this turns out to be wishful thinking.
    
    So disable error interrupts at irq install time and rely on the
    re-enabling code in the modeset functions to take care of this.
    
    Note that due to the SDE interrupt handling race we must
    uncondtionally enable all interrupt sources in SDEIER, hence no need
    to enable the SERR bit specifically.
    
    On gmch platforms we don't have an explicit enable/mask bit for fifo
    underruns. Fixing this up would require a bit of software tracking,
    hence is material for a separate patch. To make this possible we need
    to switch all gmch platforms to the new pipestat interrupt handling
    scheme Imre implemented for vlv, and then also add a safe form of sw
    state checking to __cpu_fifo_underrun_reporting_enabled a bit.
    
    v2: Also handle the ilk/snb cpu fifo underrun bits accordingly.
    Spotted by Ville.
    
    v3: Also handle the south interrupt underrun bits on ibx. Again
    spotted by Ville.
    
    Reported-by: Rob Clark <robdclark@gmail.com>
    Cc: Rob Clark <robdclark@gmail.com>
    Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Cc: stable@vger.kernel.org
    Tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: Jani Nikula <jani.nikula@intel.com>

commit 2430262
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Tue Mar 11 12:58:46 2014 +0200

    drm/i915: Fix scanline counter fixup on BDW
    
    The display interrupts changed on BDW, so the current ILK-HSW specific
    code in ilk_pipe_in_vblank_locked() doesn't work there. Add the required
    bits for BDW, and while at it, change the existing code to use nicer
    looking vblank status bit macros.
    
    Also remove the now stale __raw_i915_read16() definition which was
    left over from the failed gen2 ISR experiment.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73962
    Tested-by: Lu Hua <huax.lu@intel.com>
    Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
    Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Signed-off-by: Jani Nikula <jani.nikula@intel.com>

commit fcb8182
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Tue Mar 11 12:58:45 2014 +0200

    drm/i915: Add a workaround for HSW scanline counter weirdness
    
    On HSW the scanline counter seems to behave differently depending on
    the output type. eDP on port A does what you would expect an the normal
    +1 fixup is sufficient to cover it. But on HDMI outputs we seem to need
    a +2 fixup. Just assume we always need the +2 fixup and accept the
    slight inaccuracy on eDP.
    
    This fixes a regression introduced in:
     commit 8072bfa
     Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
     Date:   Mon Oct 28 21:22:52 2013 +0200
    
        drm/radeon: Move the early vblank IRQ fixup to radeon_get_crtc_scanoutpos()
    
    That commit removed the heuristic that tried to fix up the timestamps
    for vblank interrupts that fire a bit too early. Since then the vblank
    timestamp code would treat some vblank interrupts as spurious since the
    scanline counter would indicate that vblank_start wasn't reached yet.
    That in turn lead to incorrect vblank event sequence numbers being
    reported to userspace, which lead to unsteady framerate in applications
    such as XBMC which uses them for timing purposes.
    
    v2: Remember to call ilk_pipe_in_vblank_locked() on HSW too (Mika)
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75725
    Tested-by: bugzilla1@gmx.com
    Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
    Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Signed-off-by: Jani Nikula <jani.nikula@intel.com>

commit 51061b8
Author: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
Date:   Thu Mar 6 17:05:27 2014 -0800

    MIPS: math-emu: Fix prefx detection and COP1X function field definition
    
    When running applications which contain the instruction "prefx" on FPU-less
    CPUs, a message "Illegal instruction" will be seen. This instruction is
    supposed to be ignored by the FPU emulator. However, its current detection
    and function field encoding are incorrect. This patch fix the issue.
    
    Signed-off-by: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
    Reviewed-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
    Reviewed-by: Paul Burton <paul.burton@imgtec.com>
    Acked-by: David Daney <david.daney@cavium.com>
    Cc: linux-mips@linux-mips.org
    Cc: Steven.Hill@imgtec.com
    Patchwork: https://patchwork.linux-mips.org/patch/6608/
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

commit 7f32890
Author: Jens Axboe <axboe@fb.com>
Date:   Mon Mar 10 14:29:37 2014 -0600

    mtip32xx: fix bad use of smp_processor_id()
    
    mtip_pci_probe() dumps the current CPU when loaded, but it does
    so in a preemptible context. Hence smp_processor_id() correctly
    warns:
    
    BUG: using smp_processor_id() in preemptible [00000000] code: systemd-udevd/155
    caller is mtip_pci_probe+0x53/0x880 [mtip32xx]
    
    Switch to raw_smp_processor_id(), since it's just informational
    and persistent accuracy isn't important.
    
    Signed-off-by: Jens Axboe <axboe@fb.com>

commit 10beafc
Author: Mike Snitzer <msnitzer@redhat.com>
Date:   Sat Mar 8 20:19:20 2014 -0700

    block: change flush sequence list addition back to front add
    
    Commit 1874198 inadvertently changed the rq flush insertion
    from a head to a tail insertion. Fix that back up.
    
    Signed-off-by: Mike Snitzer <msnitzer@redhat.com>
    Signed-off-by: Jens Axboe <axboe@fb.com>

commit 7982e90
Author: Mike Snitzer <snitzer@redhat.com>
Date:   Sat Mar 8 17:20:01 2014 -0700

    block: fix q->flush_rq NULL pointer crash on dm-mpath flush
    
    Commit 1874198 ("blk-mq: rework flush sequencing logic") switched
    ->flush_rq from being an embedded member of the request_queue structure
    to being dynamically allocated in blk_init_queue_node().
    
    Request-based DM multipath doesn't use blk_init_queue_node(), instead it
    uses blk_alloc_queue_node() + blk_init_allocated_queue().  Because
    commit 1874198 placed the dynamic allocation of ->flush_rq in
    blk_init_queue_node() any flush issued to a dm-mpath device would crash
    with a NULL pointer, e.g.:
    
    BUG: unable to handle kernel NULL pointer dereference at           (null)
    IP: [<ffffffff8125037e>] blk_rq_init+0x1e/0xb0
    PGD bb3c7067 PUD bb01d067 PMD 0
    Oops: 0002 [#1] SMP
    ...
    CPU: 5 PID: 5028 Comm: dt Tainted: G        W  O 3.14.0-rc3.snitm+ torvalds#10
    ...
    task: ffff88032fb270e0 ti: ffff880079564000 task.ti: ffff880079564000
    RIP: 0010:[<ffffffff8125037e>]  [<ffffffff8125037e>] blk_rq_init+0x1e/0xb0
    RSP: 0018:ffff880079565c98  EFLAGS: 00010046
    RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000030
    RDX: ffff880260c74048 RSI: 0000000000000000 RDI: 0000000000000000
    RBP: ffff880079565ca8 R08: ffff880260aa1e98 R09: 0000000000000001
    R10: ffff88032fa78500 R11: 0000000000000246 R12: 0000000000000000
    R13: ffff880260aa1de8 R14: 0000000000000650 R15: 0000000000000000
    FS:  00007f8d36a2a700(0000) GS:ffff88033fca0000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 0000000000000000 CR3: 0000000079b36000 CR4: 00000000000007e0
    Stack:
     0000000000000000 ffff880260c74048 ffff880079565cd8 ffffffff81257a47
     ffff880260aa1de8 ffff880260c74048 0000000000000001 0000000000000000
     ffff880079565d08 ffffffff81257c2d 0000000000000000 ffff880260aa1de8
    Call Trace:
     [<ffffffff81257a47>] blk_flush_complete_seq+0x2d7/0x2e0
     [<ffffffff81257c2d>] blk_insert_flush+0x1dd/0x210
     [<ffffffff8124ec59>] __elv_add_request+0x1f9/0x320
     [<ffffffff81250681>] ? blk_account_io_start+0x111/0x190
     [<ffffffff81253a4b>] blk_queue_bio+0x25b/0x330
     [<ffffffffa0020bf5>] dm_request+0x35/0x40 [dm_mod]
     [<ffffffff812530c0>] generic_make_request+0xc0/0x100
     [<ffffffff81253173>] submit_bio+0x73/0x140
     [<ffffffff811becdd>] submit_bio_wait+0x5d/0x80
     [<ffffffff81257528>] blkdev_issue_flush+0x78/0xa0
     [<ffffffff811c1f6f>] blkdev_fsync+0x3f/0x60
     [<ffffffff811b7fde>] vfs_fsync_range+0x1e/0x20
     [<ffffffff811b7ffc>] vfs_fsync+0x1c/0x20
     [<ffffffff811b81f1>] do_fsync+0x41/0x80
     [<ffffffff8118874e>] ? SyS_lseek+0x7e/0x80
     [<ffffffff811b8260>] SyS_fsync+0x10/0x20
     [<ffffffff8154c2d2>] system_call_fastpath+0x16/0x1b
    
    Fix this by moving the ->flush_rq allocation from blk_init_queue_node()
    to blk_init_allocated_queue().  blk_init_queue_node() also calls
    blk_init_allocated_queue() so this change is functionality equivalent
    for all blk_init_queue_node() callers.
    
    Reported-by: Hannes Reinecke <hare@suse.de>
    Reported-by: Christoph Hellwig <hch@infradead.org>
    Signed-off-by: Mike Snitzer <snitzer@redhat.com>
    Signed-off-by: Jens Axboe <axboe@fb.com>

commit 031365b
Author: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
Date:   Fri Feb 28 10:23:03 2014 -0800

    MIPS: APRP: Choose the correct VPE loader by fixing the linking
    
    Now we have CONFIG_MIPS_VPE_LOADER and CONFIG_MIPS_VPE_LOADER_[CMP|MT]. The
    latter two are used by the 2 exclusive flavors. The vpe_run in malta-amon.c
    is for CMP APRP. Without the fix, this vpe_run will be used in MT APRP.
    
    Reviewed-by: Steven J. Hill <Steven.Hill@imgtec.com>
    Signed-off-by: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
    Cc: linux-mips@linux-mips.org
    Cc: john@phrozen.org
    Patchwork: https://patchwork.linux-mips.org/patch/6589/
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

commit eee5794
Author: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
Date:   Fri Feb 28 10:23:02 2014 -0800

    MIPS: APRP: Unregister rtlx interrupt hook at module exit
    
    If the aprp_hook is not assigned back to NULL, it will still be called
    after module exits. This is not wanted.
    
    Reviewed-by: Steven J. Hill <Steven.Hill@imgtec.com>
    Signed-off-by: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
    Cc: linux-mips@linux-mips.org
    Cc: john@phrozen.org
    Patchwork: https://patchwork.linux-mips.org/patch/6590/
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

commit 9c1f6e0
Author: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
Date:   Fri Feb 28 10:23:01 2014 -0800

    MIPS: APRP: Fix the linking of rtlx interrupt hook
    
    There are 2 errors with the existing aprp_hook linking:
    - The prefix CONFIG_ is missing;
    - The hook should be linked exclusively in the cases of MT and CMP.
    Signed-off-by: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
    Reviewed-by: Steven J. Hill <Steven.Hill@imgtec.com>
    Cc: linux-mips@linux-mips.org
    Cc: john@phrozen.org
    Patchwork: https://patchwork.linux-mips.org/patch/6588/
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

commit 4890e2e
Author: Markos Chandras <markos.chandras@imgtec.com>
Date:   Wed Feb 19 10:17:18 2014 +0000

    MIPS: bcm47xx: Include missing errno.h for ENXIO
    
    Fixes the following build problen on allmodconfig:
    
    arch/mips/bcm47xx/board.c: In function 'bcm47xx_board_detect':
    arch/mips/bcm47xx/board.c:291:14: error: 'ENXIO' undeclared
    (first use in this function)
    
    Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/6571/
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

commit d334c2b
Author: Manuel Lauss <manuel.lauss@gmail.com>
Date:   Thu Feb 20 14:37:40 2014 +0100

    MIPS: Alchemy: Fix unchecked kstrtoul return value
    
    enabled __must_check logic triggers a build error for mtx1 and gpr
    in the prom init code.  Fix by checking the kstrtoul() return value.
    
    Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
    Cc: Linux-MIPS <linux-mips@linux-mips.org>
    Patchwork: https://patchwork.linux-mips.org/patch/6574/
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

commit f517928
Author: Ralf Baechle <ralf@linux-mips.org>
Date:   Mon Feb 10 18:00:17 2014 +0100

    MIPS: Fix randconfig build error.
    
      CC      arch/mips/kernel/ptrace.o
    In file included from arch/mips/kernel/ptrace.c:42:0:
    arch/mips/kernel/ptrace.c: In function ‘mips_get_syscall_arg’:
    /home/ralf/src/linux/linux-mips/arch/mips/include/asm/syscall.h:60:1: error: control reaches end of non-void function [-Werror=return-type]
    cc1: all warnings being treated as errors
    make[2]: *** [arch/mips/kernel/ptrace.o] Error 1
    make[1]: *** [arch/mips/kernel] Error 2
    make: *** [arch/mips] Error 2
    
    Fixed by marking the end of mips_get_syscall_arg() as unreachable.
    
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

commit 24bd9bf
Author: Ben Widawsky <benjamin.widawsky@intel.com>
Date:   Tue Mar 4 22:38:10 2014 -0800

    drm/i915: Fix PSR programming
    
    | has a higher precedence than ?. Therefore, the calculation doesn't do
    at all what you would expect. Thanks to Ken for convincing me that this
    was indeed the issue. Send me back to C programmer school, please.
    
    I'm sort of surprised PSR was continuing to work for people. It should
    be broken IMO (and it was broken for me, but I had assumed it never
    worked).
    
    Regression from:
    commit ed8546a
    Author: Ben Widawsky <benjamin.widawsky@intel.com>
    Date:   Mon Nov 4 22:45:05 2013 -0800
    
        drm/i915/bdw: Support eDP PSR
    
    Cc: Rodrigo Vivi <rodrigo.vivi@gmail.com>
    Cc: Kenneth Graunke <kenneth.w.graunke@intel.com>
    Cc: Art Runyan <arthur.j.runyan@intel.com>
    Reported-by: "Kumar, Kiran S" <kiran.s.kumar@intel.com>
    Cc: stable@vger.kernel.org [v3.13+]
    Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
    Signed-off-by: Jani Nikula <jani.nikula@intel.com>

commit 224aa3e
Author: Stefan Agner <stefan@agner.ch>
Date:   Wed Mar 5 23:11:08 2014 +0100

    clocksource: vf_pit_timer: use complement for sched_clock reading
    
    Vybrids PIT register is monitonic decreasing. However, sched_clock
    reading needs to be monitonic increasing. Use bitwise not to get
    the complement of the clock register. This fixes the clock going
    backward. Also, the clock now starts at 0 since we load the
    register with the maximum value at start.
    
    Signed-off-by: Stefan Agner <stefan@agner.ch>
    Acked-by: Shawn Guo <shawn.guo@linaro.org>
    Cc: daniel.lezcano@linaro.org
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux@arm.linux.org.uk
    Link: http://lkml.kernel.org/r/d25af915993aec1b486be653eb86f748ddef54fe.1394057313.git.stefan@agner.ch
    Cc: stable@vger.kernel.org
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

commit 47587fc
Author: Fernando Luis Vázquez Cao <fernando_b1@lab.ntt.co.jp>
Date:   Wed Feb 26 16:51:24 2014 +0900

    HID: hidraw: fix warning destroying hidraw device files after parent
    
    I noticed that after hot unplugging a Logitech unifying receiver
    (drivers/hid/hid-logitech-dj.c) the kernel would occasionally spew a
    stack trace similar to this:
    
    usb 1-1.1.2: USB disconnect, device number 7
    WARNING: CPU: 0 PID: 2865 at fs/sysfs/group.c:216 device_del+0x40/0x1b0()
    sysfs group ffffffff8187fa20 not found for kobject 'hidraw0'
    [...]
    CPU: 0 PID: 2865 Comm: upowerd Tainted: G        W 3.14.0-rc4 torvalds#7
    Hardware name: LENOVO 7783PN4/        , BIOS 9HKT43AUS 07/11/2011
     0000000000000009 ffffffff814cd684 ffff880427ccfdf8 ffffffff810616e7
     ffff88041ec61800 ffff880427ccfe48 ffff88041e444d80 ffff880426fab8e8
     ffff880429359960 ffffffff8106174c ffffffff81714b98 0000000000000028
    Call Trace:
     [<ffffffff814cd684>] ? dump_stack+0x41/0x51
     [<ffffffff810616e7>] ? warn_slowpath_common+0x77/0x90
     [<ffffffff8106174c>] ? warn_slowpath_fmt+0x4c/0x50
     [<ffffffff81374fd0>] ? device_del+0x40/0x1b0
     [<ffffffff8137516f>] ? device_unregister+0x2f/0x50
     [<ffffffff813751fa>] ? device_destroy+0x3a/0x40
     [<ffffffffa03ca245>] ? drop_ref+0x55/0x120 [hid]
     [<ffffffffa03ca3e6>] ? hidraw_release+0x96/0xb0 [hid]
     [<ffffffff811929da>] ? __fput+0xca/0x210
     [<ffffffff8107fe17>] ? task_work_run+0x97/0xd0
     [<ffffffff810139a9>] ? do_notify_resume+0x69/0xa0
     [<ffffffff814dbd22>] ? int_signal+0x12/0x17
    ---[ end trace 63f4a46f6566d737 ]---
    
    During device removal hid_disconnect() is called via hid_hw_stop() to
    stop the device and free all its resources, including the sysfs
    files. The problem is that if a user space process, such as upowerd,
    holds a reference to a hidraw file the corresponding sysfs files will
    be kept around (drop_ref() does not call device_destroy() if the open
    counter is not 0) and it will be usb_disconnect() who, by calling
    device_del() for the USB device, will indirectly remove the sysfs
    files of the hidraw device (sysfs_remove_dir() is recursive these
    days). Because of this, by the time user space releases the last
    reference to the hidraw file and drop_ref() tries to destroy the
    device the sysfs files are already gone and the kernel will print
    the warning above.
    
    Fix this by calling device_destroy() at USB disconnect time.
    
    Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
    Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
    Cc: stable@vger.kernel.org	# 3.13
    Signed-off-by: Jiri Kosina <jkosina@suse.cz>

commit 5f5750d
Author: Frank Praznik <frank.praznik@oh.rr.com>
Date:   Wed Feb 19 13:09:22 2014 -0500

    HID: sony: Fix work queue issues.
    
    Don't initialize force-feedback for devices that don't support it to avoid calls
    to schedule_work() with an uninitialized work_struct.
    
    Move the cancel_work_sync() call out of sony_destroy_ff() since the state worker
    is used for the LEDs even when force-feedback is disabled.
    
    Remove sony_destroy_ff() to avoid a compiler warning since it is no longer used.
    
    Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
mmotm auto import authored and hnaz committed Mar 22, 2014
1 parent dcb99fd commit 954b775
Show file tree
Hide file tree
Showing 46 changed files with 330 additions and 273 deletions.
24 changes: 15 additions & 9 deletions arch/mips/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1776,12 +1776,12 @@ endchoice

config FORCE_MAX_ZONEORDER
int "Maximum zone order"
range 14 64 if HUGETLB_PAGE && PAGE_SIZE_64KB
default "14" if HUGETLB_PAGE && PAGE_SIZE_64KB
range 13 64 if HUGETLB_PAGE && PAGE_SIZE_32KB
default "13" if HUGETLB_PAGE && PAGE_SIZE_32KB
range 12 64 if HUGETLB_PAGE && PAGE_SIZE_16KB
default "12" if HUGETLB_PAGE && PAGE_SIZE_16KB
range 14 64 if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_64KB
default "14" if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_64KB
range 13 64 if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_32KB
default "13" if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_32KB
range 12 64 if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_16KB
default "12" if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_16KB
range 11 64
default "11"
help
Expand Down Expand Up @@ -2353,9 +2353,8 @@ config SECCOMP
If unsure, say Y. Only embedded should say N here.

config MIPS_O32_FP64_SUPPORT
bool "Support for O32 binaries using 64-bit FP"
bool "Support for O32 binaries using 64-bit FP (EXPERIMENTAL)"
depends on 32BIT || MIPS32_O32
default y
help
When this is enabled, the kernel will support use of 64-bit floating
point registers with binaries using the O32 ABI along with the
Expand All @@ -2367,7 +2366,14 @@ config MIPS_O32_FP64_SUPPORT
of your kernel & potentially improve FP emulation performance by
saying N here.

If unsure, say Y.
Although binutils currently supports use of this flag the details
concerning its effect upon the O32 ABI in userland are still being
worked on. In order to avoid userland becoming dependant upon current
behaviour before the details have been finalised, this option should
be considered experimental and only enabled by those working upon
said details.

If unsure, say N.

config USE_OF
bool
Expand Down
4 changes: 1 addition & 3 deletions arch/mips/alchemy/board-gpr.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@ void __init prom_init(void)
prom_init_cmdline();

memsize_str = prom_getenv("memsize");
if (!memsize_str)
if (!memsize_str || kstrtoul(memsize_str, 0, &memsize))
memsize = 0x04000000;
else
strict_strtoul(memsize_str, 0, &memsize);
add_memory_region(0, memsize, BOOT_MEM_RAM);
}

Expand Down
4 changes: 1 addition & 3 deletions arch/mips/alchemy/board-mtx1.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,8 @@ void __init prom_init(void)
prom_init_cmdline();

memsize_str = prom_getenv("memsize");
if (!memsize_str)
if (!memsize_str || kstrtoul(memsize_str, 0, &memsize))
memsize = 0x04000000;
else
strict_strtoul(memsize_str, 0, &memsize);
add_memory_region(0, memsize, BOOT_MEM_RAM);
}

Expand Down
1 change: 1 addition & 0 deletions arch/mips/bcm47xx/board.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <linux/errno.h>
#include <linux/export.h>
#include <linux/string.h>
#include <bcm47xx_board.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/bcm47xx/nvram.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ int bcm47xx_nvram_gpio_pin(const char *name)
char nvram_var[10];
char buf[30];

for (i = 0; i < 16; i++) {
for (i = 0; i < 32; i++) {
err = snprintf(nvram_var, sizeof(nvram_var), "gpio%i", i);
if (err <= 0)
continue;
Expand Down
22 changes: 12 additions & 10 deletions arch/mips/cavium-octeon/octeon-irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -975,10 +975,6 @@ static int octeon_irq_ciu_xlat(struct irq_domain *d,
if (ciu > 1 || bit > 63)
return -EINVAL;

/* These are the GPIO lines */
if (ciu == 0 && bit >= 16 && bit < 32)
return -EINVAL;

*out_hwirq = (ciu << 6) | bit;
*out_type = 0;

Expand Down Expand Up @@ -1007,6 +1003,10 @@ static int octeon_irq_ciu_map(struct irq_domain *d,
if (!octeon_irq_virq_in_range(virq))
return -EINVAL;

/* Don't map irq if it is reserved for GPIO. */
if (line == 0 && bit >= 16 && bit <32)
return 0;

if (line > 1 || octeon_irq_ciu_to_irq[line][bit] != 0)
return -EINVAL;

Expand Down Expand Up @@ -1525,10 +1525,6 @@ static int octeon_irq_ciu2_xlat(struct irq_domain *d,
ciu = intspec[0];
bit = intspec[1];

/* Line 7 are the GPIO lines */
if (ciu > 6 || bit > 63)
return -EINVAL;

*out_hwirq = (ciu << 6) | bit;
*out_type = 0;

Expand Down Expand Up @@ -1570,8 +1566,14 @@ static int octeon_irq_ciu2_map(struct irq_domain *d,
if (!octeon_irq_virq_in_range(virq))
return -EINVAL;

/* Line 7 are the GPIO lines */
if (line > 6 || octeon_irq_ciu_to_irq[line][bit] != 0)
/*
* Don't map irq if it is reserved for GPIO.
* (Line 7 are the GPIO lines.)
*/
if (line == 7)
return 0;

if (line > 7 || octeon_irq_ciu_to_irq[line][bit] != 0)
return -EINVAL;

if (octeon_irq_ciu2_is_edge(line, bit))
Expand Down
15 changes: 13 additions & 2 deletions arch/mips/include/asm/asmmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#define _ASM_ASMMACRO_H

#include <asm/hazards.h>
#include <asm/asm-offsets.h>

#ifdef CONFIG_32BIT
#include <asm/asmmacro-32.h>
Expand Down Expand Up @@ -54,11 +55,21 @@
.endm

.macro local_irq_disable reg=t0
#ifdef CONFIG_PREEMPT
lw \reg, TI_PRE_COUNT($28)
addi \reg, \reg, 1
sw \reg, TI_PRE_COUNT($28)
#endif
mfc0 \reg, CP0_STATUS
ori \reg, \reg, 1
xori \reg, \reg, 1
mtc0 \reg, CP0_STATUS
irq_disable_hazard
#ifdef CONFIG_PREEMPT
lw \reg, TI_PRE_COUNT($28)
addi \reg, \reg, -1
sw \reg, TI_PRE_COUNT($28)
#endif
.endm
#endif /* CONFIG_MIPS_MT_SMTC */

Expand Down Expand Up @@ -106,7 +117,7 @@
.endm

.macro fpu_save_double thread status tmp
#if defined(CONFIG_MIPS64) || defined(CONFIG_CPU_MIPS32_R2)
#if defined(CONFIG_64BIT) || defined(CONFIG_CPU_MIPS32_R2)
sll \tmp, \status, 5
bgez \tmp, 10f
fpu_save_16odd \thread
Expand Down Expand Up @@ -159,7 +170,7 @@
.endm

.macro fpu_restore_double thread status tmp
#if defined(CONFIG_MIPS64) || defined(CONFIG_CPU_MIPS32_R2)
#if defined(CONFIG_64BIT) || defined(CONFIG_CPU_MIPS32_R2)
sll \tmp, \status, 5
bgez \tmp, 10f # 16 register mode?

Expand Down
2 changes: 1 addition & 1 deletion arch/mips/include/asm/fpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static inline int __enable_fpu(enum fpu_mode mode)
return 0;

case FPU_64BIT:
#if !(defined(CONFIG_CPU_MIPS32_R2) || defined(CONFIG_MIPS64))
#if !(defined(CONFIG_CPU_MIPS32_R2) || defined(CONFIG_64BIT))
/* we only have a 32-bit FPU */
return SIGFPE;
#endif
Expand Down
20 changes: 10 additions & 10 deletions arch/mips/include/asm/ftrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,43 +22,43 @@ extern void _mcount(void);
#define safe_load(load, src, dst, error) \
do { \
asm volatile ( \
"1: " load " %[" STR(dst) "], 0(%[" STR(src) "])\n"\
" li %[" STR(error) "], 0\n" \
"1: " load " %[tmp_dst], 0(%[tmp_src])\n" \
" li %[tmp_err], 0\n" \
"2:\n" \
\
".section .fixup, \"ax\"\n" \
"3: li %[" STR(error) "], 1\n" \
"3: li %[tmp_err], 1\n" \
" j 2b\n" \
".previous\n" \
\
".section\t__ex_table,\"a\"\n\t" \
STR(PTR) "\t1b, 3b\n\t" \
".previous\n" \
\
: [dst] "=&r" (dst), [error] "=r" (error)\
: [src] "r" (src) \
: [tmp_dst] "=&r" (dst), [tmp_err] "=r" (error)\
: [tmp_src] "r" (src) \
: "memory" \
); \
} while (0)

#define safe_store(store, src, dst, error) \
do { \
asm volatile ( \
"1: " store " %[" STR(src) "], 0(%[" STR(dst) "])\n"\
" li %[" STR(error) "], 0\n" \
"1: " store " %[tmp_src], 0(%[tmp_dst])\n"\
" li %[tmp_err], 0\n" \
"2:\n" \
\
".section .fixup, \"ax\"\n" \
"3: li %[" STR(error) "], 1\n" \
"3: li %[tmp_err], 1\n" \
" j 2b\n" \
".previous\n" \
\
".section\t__ex_table,\"a\"\n\t"\
STR(PTR) "\t1b, 3b\n\t" \
".previous\n" \
\
: [error] "=r" (error) \
: [dst] "r" (dst), [src] "r" (src)\
: [tmp_err] "=r" (error) \
: [tmp_dst] "r" (dst), [tmp_src] "r" (src)\
: "memory" \
); \
} while (0)
Expand Down
10 changes: 6 additions & 4 deletions arch/mips/include/asm/syscall.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#ifndef __ASM_MIPS_SYSCALL_H
#define __ASM_MIPS_SYSCALL_H

#include <linux/compiler.h>
#include <linux/audit.h>
#include <linux/elf-em.h>
#include <linux/kernel.h>
Expand All @@ -39,14 +40,14 @@ static inline unsigned long mips_get_syscall_arg(unsigned long *arg,

#ifdef CONFIG_32BIT
case 4: case 5: case 6: case 7:
return get_user(*arg, (int *)usp + 4 * n);
return get_user(*arg, (int *)usp + n);
#endif

#ifdef CONFIG_64BIT
case 4: case 5: case 6: case 7:
#ifdef CONFIG_MIPS32_O32
if (test_thread_flag(TIF_32BIT_REGS))
return get_user(*arg, (int *)usp + 4 * n);
return get_user(*arg, (int *)usp + n);
else
#endif
*arg = regs->regs[4 + n];
Expand All @@ -57,6 +58,8 @@ static inline unsigned long mips_get_syscall_arg(unsigned long *arg,
default:
BUG();
}

unreachable();
}

static inline long syscall_get_return_value(struct task_struct *task,
Expand All @@ -83,11 +86,10 @@ static inline void syscall_get_arguments(struct task_struct *task,
unsigned int i, unsigned int n,
unsigned long *args)
{
unsigned long arg;
int ret;

while (n--)
ret |= mips_get_syscall_arg(&arg, task, regs, i++);
ret |= mips_get_syscall_arg(args++, task, regs, i++);

/*
* No way to communicate an error because this is a void function.
Expand Down
4 changes: 2 additions & 2 deletions arch/mips/include/uapi/asm/inst.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ enum cop1_sdw_func {
*/
enum cop1x_func {
lwxc1_op = 0x00, ldxc1_op = 0x01,
pfetch_op = 0x07, swxc1_op = 0x08,
sdxc1_op = 0x09, madd_s_op = 0x20,
swxc1_op = 0x08, sdxc1_op = 0x09,
pfetch_op = 0x0f, madd_s_op = 0x20,
madd_d_op = 0x21, madd_e_op = 0x22,
msub_s_op = 0x28, msub_d_op = 0x29,
msub_e_op = 0x2a, nmadd_s_op = 0x30,
Expand Down
5 changes: 2 additions & 3 deletions arch/mips/kernel/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,10 @@ static int ftrace_modify_code_2(unsigned long ip, unsigned int new_code1,
safe_store_code(new_code1, ip, faulted);
if (unlikely(faulted))
return -EFAULT;
ip += 4;
safe_store_code(new_code2, ip, faulted);
safe_store_code(new_code2, ip + 4, faulted);
if (unlikely(faulted))
return -EFAULT;
flush_icache_range(ip, ip + 8); /* original ip + 12 */
flush_icache_range(ip, ip + 8);
return 0;
}
#endif
Expand Down
16 changes: 8 additions & 8 deletions arch/mips/kernel/r4k_fpu.S
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
LEAF(_save_fp_context)
cfc1 t1, fcr31

#if defined(CONFIG_64BIT) || defined(CONFIG_MIPS32_R2)
#if defined(CONFIG_64BIT) || defined(CONFIG_CPU_MIPS32_R2)
.set push
#ifdef CONFIG_MIPS32_R2
#ifdef CONFIG_CPU_MIPS32_R2
.set mips64r2
mfc0 t0, CP0_STATUS
sll t0, t0, 5
Expand Down Expand Up @@ -146,11 +146,11 @@ LEAF(_save_fp_context32)
* - cp1 status/control register
*/
LEAF(_restore_fp_context)
EX lw t0, SC_FPC_CSR(a0)
EX lw t1, SC_FPC_CSR(a0)

#if defined(CONFIG_64BIT) || defined(CONFIG_MIPS32_R2)
#if defined(CONFIG_64BIT) || defined(CONFIG_CPU_MIPS32_R2)
.set push
#ifdef CONFIG_MIPS32_R2
#ifdef CONFIG_CPU_MIPS32_R2
.set mips64r2
mfc0 t0, CP0_STATUS
sll t0, t0, 5
Expand Down Expand Up @@ -191,15 +191,15 @@ LEAF(_restore_fp_context)
EX ldc1 $f26, SC_FPREGS+208(a0)
EX ldc1 $f28, SC_FPREGS+224(a0)
EX ldc1 $f30, SC_FPREGS+240(a0)
ctc1 t0, fcr31
ctc1 t1, fcr31
jr ra
li v0, 0 # success
END(_restore_fp_context)

#ifdef CONFIG_MIPS32_COMPAT
LEAF(_restore_fp_context32)
/* Restore an o32 sigcontext. */
EX lw t0, SC32_FPC_CSR(a0)
EX lw t1, SC32_FPC_CSR(a0)

mfc0 t0, CP0_STATUS
sll t0, t0, 5
Expand Down Expand Up @@ -239,7 +239,7 @@ LEAF(_restore_fp_context32)
EX ldc1 $f26, SC32_FPREGS+208(a0)
EX ldc1 $f28, SC32_FPREGS+224(a0)
EX ldc1 $f30, SC32_FPREGS+240(a0)
ctc1 t0, fcr31
ctc1 t1, fcr31
jr ra
li v0, 0 # success
END(_restore_fp_context32)
Expand Down
3 changes: 3 additions & 0 deletions arch/mips/kernel/rtlx-cmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,8 @@ void __exit rtlx_module_exit(void)

for (i = 0; i < RTLX_CHANNELS; i++)
device_destroy(mt_class, MKDEV(major, i));

unregister_chrdev(major, RTLX_MODULE_NAME);

aprp_hook = NULL;
}
3 changes: 3 additions & 0 deletions arch/mips/kernel/rtlx-mt.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,8 @@ void __exit rtlx_module_exit(void)

for (i = 0; i < RTLX_CHANNELS; i++)
device_destroy(mt_class, MKDEV(major, i));

unregister_chrdev(major, RTLX_MODULE_NAME);

aprp_hook = NULL;
}
Loading

0 comments on commit 954b775

Please sign in to comment.