1. 09 Jan, 2014 31 commits
  2. 20 Dec, 2013 9 commits
    • Greg Kroah-Hartman's avatar
      Linux 3.12.6 · d0266db2
      Greg Kroah-Hartman authored
      d0266db2
    • Roger Quadros's avatar
      ARM: OMAP2+: hwmod: Fix SOFTRESET logic · 8dc40be1
      Roger Quadros authored
      commit 313a76ee upstream.
      
      In _ocp_softreset(), after _set_softreset() + write_sysconfig(),
      the hwmod's sysc_cache will always contain SOFTRESET bit set
      so all further writes to sysconfig using this cache will initiate
      a repeated SOFTRESET e.g. enable_sysc(). This is true for OMAP3 like
      platforms that have RESET_DONE status in the SYSSTATUS register and
      so the the SOFTRESET bit in SYSCONFIG is not automatically cleared.
      It is not a problem for OMAP4 like platforms that indicate RESET
      completion by clearing the SOFTRESET bit in the SYSCONFIG register.
      
      This repeated SOFTRESET is undesired and was the root cause of
      USB host issues on OMAP3 platforms when hwmod was allowed to do the
      SOFTRESET for the USB Host module.
      
      To fix this we clear the SOFTRESET bit and update the sysconfig
      register + sysc_cache using write_sysconfig().
      Signed-off-by: default avatarRoger Quadros <rogerq@ti.com>
      Tested-by: Tomi Valkeinen <tomi.valkeinen@ti.com> # Panda, BeagleXM
      [paul@pwsan.com: renamed _clr_softreset() to _clear_softreset()]
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8dc40be1
    • Chris Wilson's avatar
      drm/i915/vlv: fix up broken precision in vlv_crtc_clock_get · fd7a5ac9
      Chris Wilson authored
      commit 662c6ecb upstream.
      
      With some divider values we end up with the wrong result.  So remove the
      intermediates (like Ville suggested in the first place) to get the right
      answer.
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fd7a5ac9
    • Jesse Barnes's avatar
      drm/i915/vlv: add VLV specific clock_get function v3 · 7870bfa3
      Jesse Barnes authored
      commit acbec814 upstream.
      
      Calculation is a little different than other platforms.
      
      v2: update to use port_clock instead
          rebase on top of Ville's changes
      v3: update to new port_clock semantics - don't divide by
          pixel_multiplier (Ville)
      
      References: https://bugs.freedesktop.org/show_bug.cgi?id=67345Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7870bfa3
    • Jesse Barnes's avatar
      i915/vlv: untangle integrated clock source handling v4 · 132f0f78
      Jesse Barnes authored
      commit f6071166 upstream.
      
      The global integrated clock source bit resides in DPLL B on VLV, but we
      were treating it as a per-pipe resource.  It needs to be set whenever
      any PLL is active, so pull setting the bit out of vlv_update_pll and
      into vlv_enable_pll.  Also add a vlv_disable_pll to prevent disabling it
      when pipe B shuts down.
      
      I'm guessing on the references here, I expect this to bite any config
      where multiple displays are active or displays are moved from pipe to
      pipe.
      
      v2: re-add bits in vlv_update_pll to keep from confusing the state checker
      v3: use enum pipe checks (Daniel)
          set CRI clock source early (Ville)
          consistently set CRI clock source everywhere (Ville)
      v4: drop unnecessary setting of bit in vlv enable pll (Ville)
      
      References: https://bugs.freedesktop.org/show_bug.cgi?id=67245
      References: https://bugs.freedesktop.org/show_bug.cgi?id=69693Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      [danvet: s/1/PIPE_B/]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      
      132f0f78
    • Liu Bo's avatar
      Btrfs: fix lockdep error in async commit · 5298b6d3
      Liu Bo authored
      commit b1a06a4b upstream.
      
      Lockdep complains about btrfs's async commit:
      
      [ 2372.462171] [ BUG: bad unlock balance detected! ]
      [ 2372.462191] 3.12.0+ #32 Tainted: G        W
      [ 2372.462209] -------------------------------------
      [ 2372.462228] ceph-osd/14048 is trying to release lock (sb_internal) at:
      [ 2372.462275] [<ffffffffa022cb10>] btrfs_commit_transaction_async+0x1b0/0x2a0 [btrfs]
      [ 2372.462305] but there are no more locks to release!
      [ 2372.462324]
      [ 2372.462324] other info that might help us debug this:
      [ 2372.462349] no locks held by ceph-osd/14048.
      [ 2372.462367]
      [ 2372.462367] stack backtrace:
      [ 2372.462386] CPU: 2 PID: 14048 Comm: ceph-osd Tainted: G        W    3.12.0+ #32
      [ 2372.462414] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./To be filled by O.E.M., BIOS 080015  11/09/2011
      [ 2372.462455]  ffffffffa022cb10 ffff88007490fd28 ffffffff816f094a ffff8800378aa320
      [ 2372.462491]  ffff88007490fd50 ffffffff810adf4c ffff8800378aa320 ffff88009af97650
      [ 2372.462526]  ffffffffa022cb10 ffff88007490fd88 ffffffff810b01ee ffff8800898c0000
      [ 2372.462562] Call Trace:
      [ 2372.462584]  [<ffffffffa022cb10>] ? btrfs_commit_transaction_async+0x1b0/0x2a0 [btrfs]
      [ 2372.462619]  [<ffffffff816f094a>] dump_stack+0x45/0x56
      [ 2372.462642]  [<ffffffff810adf4c>] print_unlock_imbalance_bug+0xec/0x100
      [ 2372.462677]  [<ffffffffa022cb10>] ? btrfs_commit_transaction_async+0x1b0/0x2a0 [btrfs]
      [ 2372.462710]  [<ffffffff810b01ee>] lock_release+0x18e/0x210
      [ 2372.462742]  [<ffffffffa022cb36>] btrfs_commit_transaction_async+0x1d6/0x2a0 [btrfs]
      [ 2372.462783]  [<ffffffffa025a7ce>] btrfs_ioctl_start_sync+0x3e/0xc0 [btrfs]
      [ 2372.462822]  [<ffffffffa025f1d3>] btrfs_ioctl+0x4c3/0x1f70 [btrfs]
      [ 2372.462849]  [<ffffffff812c0321>] ? avc_has_perm+0x121/0x1b0
      [ 2372.462873]  [<ffffffff812c0224>] ? avc_has_perm+0x24/0x1b0
      [ 2372.462897]  [<ffffffff8107ecc8>] ? sched_clock_cpu+0xa8/0x100
      [ 2372.462922]  [<ffffffff8117b145>] do_vfs_ioctl+0x2e5/0x4e0
      [ 2372.462946]  [<ffffffff812c19e6>] ? file_has_perm+0x86/0xa0
      [ 2372.462969]  [<ffffffff8117b3c1>] SyS_ioctl+0x81/0xa0
      [ 2372.462991]  [<ffffffff817045a4>] tracesys+0xdd/0xe2
      
      ====================================================
      
      It's because that we don't do the right thing when checking if it's ok to
      tell lockdep that we're trying to release the rwsem.
      
      If the trans handle's type is TRANS_ATTACH, we won't acquire the freeze rwsem, but
      as TRANS_ATTACH fits the check (trans < TRANS_JOIN_NOLOCK), we'll release the freeze
      rwsem, which makes lockdep complains a lot.
      Reported-by: default avatarMa Jianpeng <majianpeng@gmail.com>
      Signed-off-by: default avatarLiu Bo <bo.li.liu@oracle.com>
      Signed-off-by: default avatarMiao Xie <miaox@cn.fujitsu.com>
      Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
      Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5298b6d3
    • Liu Bo's avatar
      Btrfs: fix a crash when running balance and defrag concurrently · 6f01df18
      Liu Bo authored
      commit 48ec4736 upstream.
      
      Running balance and defrag concurrently can end up with a crash:
      
      kernel BUG at fs/btrfs/relocation.c:4528!
      RIP: 0010:[<ffffffffa01ac33b>]  [<ffffffffa01ac33b>] btrfs_reloc_cow_block+ 0x1eb/0x230 [btrfs]
      Call Trace:
        [<ffffffffa01398c1>] ? update_ref_for_cow+0x241/0x380 [btrfs]
        [<ffffffffa0180bad>] ? copy_extent_buffer+0xad/0x110 [btrfs]
        [<ffffffffa0139da1>] __btrfs_cow_block+0x3a1/0x520 [btrfs]
        [<ffffffffa013a0b6>] btrfs_cow_block+0x116/0x1b0 [btrfs]
        [<ffffffffa013ddad>] btrfs_search_slot+0x43d/0x970 [btrfs]
        [<ffffffffa0153c57>] btrfs_lookup_file_extent+0x37/0x40 [btrfs]
        [<ffffffffa0172a5e>] __btrfs_drop_extents+0x11e/0xae0 [btrfs]
        [<ffffffffa013b3fd>] ? generic_bin_search.constprop.39+0x8d/0x1a0 [btrfs]
        [<ffffffff8117d14a>] ? kmem_cache_alloc+0x1da/0x200
        [<ffffffffa0138e7a>] ? btrfs_alloc_path+0x1a/0x20 [btrfs]
        [<ffffffffa0173ef0>] btrfs_drop_extents+0x60/0x90 [btrfs]
        [<ffffffffa016b24d>] relink_extent_backref+0x2ed/0x780 [btrfs]
        [<ffffffffa0162fe0>] ? btrfs_submit_bio_hook+0x1e0/0x1e0 [btrfs]
        [<ffffffffa01b8ed7>] ? iterate_inodes_from_logical+0x87/0xa0 [btrfs]
        [<ffffffffa016b909>] btrfs_finish_ordered_io+0x229/0xac0 [btrfs]
        [<ffffffffa016c3b5>] finish_ordered_fn+0x15/0x20 [btrfs]
        [<ffffffffa018cbe5>] worker_loop+0x125/0x4e0 [btrfs]
        [<ffffffffa018cac0>] ? btrfs_queue_worker+0x300/0x300 [btrfs]
        [<ffffffff81075ea0>] kthread+0xc0/0xd0
        [<ffffffff81075de0>] ? insert_kthread_work+0x40/0x40
        [<ffffffff8164796c>] ret_from_fork+0x7c/0xb0
        [<ffffffff81075de0>] ? insert_kthread_work+0x40/0x40
      ----------------------------------------------------------------------
      
      It turns out to be that balance operation will bump root's @last_snapshot,
      which enables snapshot-aware defrag path, and backref walking stuff will
      find data reloc tree as refs' parent, and hit the BUG_ON() during COW.
      
      As data reloc tree's data is just for relocation purpose, and will be deleted right
      after relocation is done, it's unnecessary to walk those refs belonged to data reloc
      tree, it'd be better to skip them.
      Signed-off-by: default avatarLiu Bo <bo.li.liu@oracle.com>
      Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
      Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6f01df18
    • Liu Bo's avatar
      Btrfs: do not run snapshot-aware defragment on error · 9e5787de
      Liu Bo authored
      commit 6f519564 upstream.
      
      If something wrong happens in write endio, running snapshot-aware defragment
      can end up with undefined results, maybe a crash, so we should avoid it.
      
      In order to share similar code, this also adds a helper to free the struct for
      snapshot-aware defrag.
      Signed-off-by: default avatarLiu Bo <bo.li.liu@oracle.com>
      Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
      Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9e5787de
    • Josef Bacik's avatar
      Btrfs: take ordered root lock when removing ordered operations inode · 486d1e16
      Josef Bacik authored
      commit 93858769 upstream.
      
      A user reported a list corruption warning from btrfs_remove_ordered_extent, it
      is because we aren't taking the ordered_root_lock when we remove the inode from
      the ordered operations list.  Thanks,
      Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
      Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      486d1e16