1. 17 Jan, 2013 1 commit
    • Jani Nikula's avatar
      drm/i915: fix FORCEWAKE posting reads · b5144075
      Jani Nikula authored
      We stopped reading FORCEWAKE for posting reads in
      
      commit 8dee3eea
      Author: Ben Widawsky <ben@bwidawsk.net>
      Date:   Sat Sep 1 22:59:50 2012 -0700
      
          drm/i915: Never read FORCEWAKE
      
      and started using something from the same cacheline instead. On the
      bug reporter's machine this broke entering rc6 states after a
      suspend/resume cycle. It turns out reading ECOBUS as posting read
      worked fine, while GTFIFODBG did not, preventing RC6 states after
      suspend/resume per the bug report referenced below. It's not entirely
      clear why, but clearly GTFIFODBG was nowhere near the same cacheline
      or address range as FORCEWAKE.
      
      Trying out various registers for posting reads showed that all tested
      registers for which NEEDS_FORCE_WAKE() (in i915_drv.c) returns true
      work. Conversely, most (but not quite all) registers for which
      NEEDS_FORCE_WAKE() returns false do not work. Details in the referenced
      bug.
      
      Based on the above, add posting reads on ECOBUS where GTFIFODBG was
      previously relied on.
      
      In true cargo cult spirit, add posting reads for FORCEWAKE_VLV writes as
      well, but instead of ECOBUS, use FORCEWAKE_ACK_VLV which is in the same
      address range as FORCEWAKE_VLV.
      
      v2: Add more details to the commit message. No functional changes.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=52411Reported-and-tested-by: default avatarAlexander Bersenev <bay@hackerdom.ru>
      CC: Ben Widawsky <ben@bwidawsk.net>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: stable@vger.kernel.org
      [danvet: add cc: stable and make the commit message a bit clearer that
      this is a regression fix and what exactly broke.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      b5144075
  2. 16 Jan, 2013 2 commits
    • Chris Wilson's avatar
      drm/i915: Invalidate the relocation presumed_offsets along the slow path · 262b6d36
      Chris Wilson authored
      In the slow path, we are forced to copy the relocations prior to
      acquiring the struct mutex in order to handle pagefaults. We forgo
      copying the new offsets back into the relocation entries in order to
      prevent a recursive locking bug should we trigger a pagefault whilst
      holding the mutex for the reservations of the execbuffer. Therefore, we
      need to reset the presumed_offsets just in case the objects are rebound
      back into their old locations after relocating for this exexbuffer - if
      that were to happen we would assume the relocations were valid and leave
      the actual pointers to the kernels dangling, instant hang.
      
      Fixes regression from commit bcf50e27
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Sun Nov 21 22:07:12 2010 +0000
      
          drm/i915: Handle pagefaults in execbuffer user relocations
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55984Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel.vetter@fwll.ch>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      262b6d36
    • Jani Nikula's avatar
      drm/i915/eDP: do not write power sequence registers for ghost eDP · f30d26e4
      Jani Nikula authored
      Some machines detect an eDP port even if it's not really there, and eDP
      initialization has a fail path for this. Typically such machines have an
      LVDS display instead. A regression introduced in
      
      commit 82ed61fa
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Sat Oct 20 20:57:41 2012 +0200
      
          drm/i915: make edp panel power sequence setup more robust
      
      updated the power sequence registers PCH_PP_ON_DELAYS, PCH_PP_OFF_DELAYS,
      and PCH_PP_DIVISOR also in the ghost eDP case, messing up the LVDS display.
      
      Split the power sequencer initialization into two, delaying the register
      updates until after we know the eDP is real.
      
      Note: Keep the PP_CONTROL unlocking in the first part, even if it does not
      update registers, per the commit message of the above mentioned commit.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=52601Reported-and-tested-by: default avatarRyan Coe <ryan@rycomotorsports.com>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      f30d26e4
  3. 15 Jan, 2013 1 commit
  4. 10 Jan, 2013 1 commit
    • Daniel Vetter's avatar
      drm/i915: Revert shrinker changes from "Track unbound pages" · 93927ca5
      Daniel Vetter authored
      This partially reverts
      
      commit 6c085a72
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Mon Aug 20 11:40:46 2012 +0200
      
          drm/i915: Track unbound pages
      
      Closer inspection of that patch revealed a bunch of unrelated changes
      in the shrinker:
      - The shrinker count is now in pages instead of objects.
      - For counting the shrinkable objects the old code only looked at the
        inactive list, the new code looks at all bounds objects (including
        pinned ones). That is obviously in addition to the new unbound list.
      - The shrinker cound is no longer scaled with
        sysctl_vfs_cache_pressure. Note though that with the default tuning
        value of vfs_cache_pressue = 100 this doesn't affect the shrinker
        behaviour.
      - When actually shrinking objects, the old code first dropped
        purgeable objects, then normal (inactive) objects. Only then did it,
        in a last-ditch effort idle the gpu and evict everything. The new
        code omits the intermediate step of evicting normal inactive
        objects.
      
      Safe for the first change, which seems benign, and the shrinker count
      scaling, which is a bit a different story, the endresult of all these
      changes is that the shrinker is _much_ more likely to fall back to the
      last-ditch resort of idling the gpu and evicting everything.  The old
      code could only do that if something else evicted lots of objects
      meanwhile (since without any other changes the nr_to_scan will be
      smaller than the object count).
      
      Reverting the vfs_cache_pressure behaviour itself is a bit bogus: Only
      dentry/inode object caches should scale their shrinker counts with
      vfs_cache_pressure. Originally I've had that change reverted, too. But
      Chris Wilson insisted that it's too bogus and shouldn't again see the
      light of day.
      
      Hence revert all these other changes and restore the old shrinker
      behaviour, with the minor adjustment that we now first scan the
      unbound list, then the inactive list for each object category
      (purgeable or normal).
      
      A similar patch has been tested by a few people affected by the gen4/5
      hangs which started to appear in 3.7, which some people bisected to
      the "drm/i915: Track unbound pages" commit. But just disabling the
      unbound logic alone didn't change things at all.
      
      Note that this patch doesn't fix the referenced bugs, it only hides
      the underlying bug(s) well enough to restore pre-3.7 behaviour. The
      key to achieve that is to massively reduce the likelyhood of going
      into a full gpu stall and evicting everything.
      
      v2: Reword commit message a bit, taking Chris Wilson's comment into
      account.
      
      v3: On Chris Wilson's insistency, do not reinstate the rather bogus
      vfs_cache_pressure change.
      Tested-by: default avatarGreg KH <gregkh@linuxfoundation.org>
      Tested-by: default avatarDave Kleikamp <dave.kleikamp@oracle.com>
      References: https://bugs.freedesktop.org/show_bug.cgi?id=55984
      References: https://bugs.freedesktop.org/show_bug.cgi?id=57122
      References: https://bugs.freedesktop.org/show_bug.cgi?id=56916
      References: https://bugs.freedesktop.org/show_bug.cgi?id=57136
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: stable@vger.kernel.org
      Acked-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      93927ca5
  5. 09 Jan, 2013 1 commit
  6. 08 Jan, 2013 3 commits
  7. 07 Jan, 2013 3 commits
  8. 03 Jan, 2013 10 commits
  9. 02 Jan, 2013 8 commits
    • Linus Torvalds's avatar
      Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · 5439ca6b
      Linus Torvalds authored
      Pull ext4 bug fixes from Ted Ts'o:
       "Various bug fixes for ext4.  Perhaps the most serious bug fixed is one
        which could cause file system corruptions when performing file punch
        operations."
      
      * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: avoid hang when mounting non-journal filesystems with orphan list
        ext4: lock i_mutex when truncating orphan inodes
        ext4: do not try to write superblock on ro remount w/o journal
        ext4: include journal blocks in df overhead calcs
        ext4: remove unaligned AIO warning printk
        ext4: fix an incorrect comment about i_mutex
        ext4: fix deadlock in journal_unmap_buffer()
        ext4: split off ext4_journalled_invalidatepage()
        jbd2: fix assertion failure in jbd2_journal_flush()
        ext4: check dioread_nolock on remount
        ext4: fix extent tree corruption caused by hole punch
      5439ca6b
    • Hugh Dickins's avatar
      mempolicy: remove arg from mpol_parse_str, mpol_to_str · a7a88b23
      Hugh Dickins authored
      Remove the unused argument (formerly no_context) from mpol_parse_str()
      and from mpol_to_str().
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a7a88b23
    • Hugh Dickins's avatar
      tmpfs mempolicy: fix /proc/mounts corrupting memory · f2a07f40
      Hugh Dickins authored
      Recently I suggested using "mount -o remount,mpol=local /tmp" in NUMA
      mempolicy testing.  Very nasty.  Reading /proc/mounts, /proc/pid/mounts
      or /proc/pid/mountinfo may then corrupt one bit of kernel memory, often
      in a page table (causing "Bad swap" or "Bad page map" warning or "Bad
      pagetable" oops), sometimes in a vm_area_struct or rbnode or somewhere
      worse.  "mpol=prefer" and "mpol=prefer:Node" are equally toxic.
      
      Recent NUMA enhancements are not to blame: this dates back to 2.6.35,
      when commit e17f74af "mempolicy: don't call mpol_set_nodemask() when
      no_context" skipped mpol_parse_str()'s call to mpol_set_nodemask(),
      which used to initialize v.preferred_node, or set MPOL_F_LOCAL in flags.
      With slab poisoning, you can then rely on mpol_to_str() to set the bit
      for node 0x6b6b, probably in the next page above the caller's stack.
      
      mpol_parse_str() is only called from shmem_parse_options(): no_context
      is always true, so call it unused for now, and remove !no_context code.
      Set v.nodes or v.preferred_node or MPOL_F_LOCAL as mpol_to_str() might
      expect.  Then mpol_to_str() can ignore its no_context argument also,
      the mpol being appropriately initialized whether contextualized or not.
      Rename its no_context unused too, and let subsequent patch remove them
      (that's not needed for stable backporting, which would involve rejects).
      
      I don't understand why MPOL_LOCAL is described as a pseudo-policy:
      it's a reasonable policy which suffers from a confusing implementation
      in terms of MPOL_PREFERRED with MPOL_F_LOCAL.  I believe this would be
      much more robust if MPOL_LOCAL were recognized in switch statements
      throughout, MPOL_F_LOCAL deleted, and MPOL_PREFERRED use the (possibly
      empty) nodes mask like everyone else, instead of its preferred_node
      variant (I presume an optimization from the days before MPOL_LOCAL).
      But that would take me too long to get right and fully tested.
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f2a07f40
    • Eric Wong's avatar
      epoll: prevent missed events on EPOLL_CTL_MOD · 128dd175
      Eric Wong authored
      EPOLL_CTL_MOD sets the interest mask before calling f_op->poll() to
      ensure events are not missed.  Since the modifications to the interest
      mask are not protected by the same lock as ep_poll_callback, we need to
      ensure the change is visible to other CPUs calling ep_poll_callback.
      
      We also need to ensure f_op->poll() has an up-to-date view of past
      events which occured before we modified the interest mask.  So this
      barrier also pairs with the barrier in wq_has_sleeper().
      
      This should guarantee either ep_poll_callback or f_op->poll() (or both)
      will notice the readiness of a recently-ready/modified item.
      
      This issue was encountered by Andreas Voellmy and Junchang(Jason) Wang in:
      http://thread.gmane.org/gmane.linux.kernel/1408782/Signed-off-by: default avatarEric Wong <normalperson@yhbt.net>
      Cc: Hans Verkuil <hans.verkuil@cisco.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Davide Libenzi <davidel@xmailserver.org>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andreas Voellmy <andreas.voellmy@yale.edu>
      Tested-by: default avatar"Junchang(Jason) Wang" <junchang.wang@yale.edu>
      Cc: netdev@vger.kernel.org
      Cc: linux-fsdevel@vger.kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      128dd175
    • Aaro Koskinen's avatar
      watchdog: twl4030_wdt: add DT support · 8899b8d9
      Aaro Koskinen authored
      Add DT support for twl4030_wdt. This is needed to get twl4030_wdt to
      probe when booting with DT.
      Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      8899b8d9
    • Aaro Koskinen's avatar
      watchdog: omap_wdt: eliminate unused variable and a compiler warning · 412b3729
      Aaro Koskinen authored
      We forgot to delete this in the commit 4f4753d9 (watchdog: omap_wdt:
      convert to devm_ functions), and as a result the following compilation
      warning was introduced:
      
      drivers/watchdog/omap_wdt.c: In function 'omap_wdt_remove':
      drivers/watchdog/omap_wdt.c:299:19: warning: unused variable 'res' [-Wunused-variable]
      Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
      Reviewed-by: default avatarPaul Walmsley <paul@pwsan.com>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      412b3729
    • Axel Lin's avatar
      watchdog: da9055: Don't update wdt_dev->timeout in da9055_wdt_set_timeout error path · 98e4a293
      Axel Lin authored
      Otherwise, WDIOC_GETTIMEOUT returns wrong value if set_timeout fails.
      This patch also removes unnecessary ret variable in da9055_wdt_ping function.
      Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      98e4a293
    • Axel Lin's avatar
      watchdog: da9055: Fix invalid free of devm_ allocated data · ee8c94ad
      Axel Lin authored
      It is not required to free devm_ allocated data. Since kref_put
      needs a valid release function, da9055_wdt_release_resources()
      is not deleted.
      Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      ee8c94ad
  10. 30 Dec, 2012 10 commits