1. 08 Feb, 2013 9 commits
    • Dave Airlie's avatar
      Merge branch 'fbcon-locking-fixes' of ssh://people.freedesktop.org/~airlied/linux into drm-next · 6dc1c49d
      Dave Airlie authored
      This pulls in most of Linus tree up to -rc6, this fixes the worst lockdep
      reported issues and re-enables fbcon lockdep.
      
      (not the fbcon maintainer)
      * 'fbcon-locking-fixes' of ssh://people.freedesktop.org/~airlied/linux: (529 commits)
        Revert "Revert "console: implement lockdep support for console_lock""
        fbcon: fix locking harder
        fb: Yet another band-aid for fixing lockdep mess
        fb: rework locking to fix lock ordering on takeover
      6dc1c49d
    • Dave Airlie's avatar
      Revert "Revert "console: implement lockdep support for console_lock"" · 5845b81b
      Dave Airlie authored
      This reverts commit ff0d05bf.
      
      Now that we have all the locking fixes in place, we can revert the
      revert. This re-enables lockdep tracking for the console lock,
      daee7797.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      5845b81b
    • Dave Airlie's avatar
      fbcon: fix locking harder · 054430e7
      Dave Airlie authored
      Okay so Alan's patch handled the case where there was no registered fbcon,
      however the other path entered in set_con2fb_map pit.
      
      In there we called fbcon_takeover, but we also took the console lock in a couple
      of places. So push the console lock out to the callers of set_con2fb_map,
      
      this means fbmem and switcheroo needed to take the lock around the fb notifier
      entry points that lead to this.
      
      This should fix the efifb regression seen by Maarten.
      Tested-by: default avatarMaarten Lankhorst <maarten.lankhorst@canonical.com>
      Tested-by: default avatarLu Hua <huax.lu@intel.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      054430e7
    • Takashi Iwai's avatar
      fb: Yet another band-aid for fixing lockdep mess · e93a9a86
      Takashi Iwai authored
      I've still got lockdep warnings even after Alan's patch, and it seems that
      yet more band aids are required to paper over similar paths for
      unbind_con_driver() and unregister_con_driver().  After this hack, lockdep
      warnings are finally gone.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Cc: Alan Cox <alan@linux.intel.com>
      Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Cc: stable <stable@vger.kernel.org>
      Tested-by: default avatarSedat Dilek <sedat.dilek@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      e93a9a86
    • Alan Cox's avatar
      fb: rework locking to fix lock ordering on takeover · 50e244cc
      Alan Cox authored
      Adjust the console layer to allow a take over call where the caller
      already holds the locks.  Make the fb layer lock in order.
      
      This is partly a band aid, the fb layer is terminally confused about the
      locking rules it uses for its notifiers it seems.
      
      [akpm@linux-foundation.org: remove stray non-ascii char, tidy comment]
      [akpm@linux-foundation.org: export do_take_over_console()]
      [airlied: cleanup another non-ascii char]
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Cc: stable <stable@vger.kernel.org>
      Tested-by: default avatarSedat Dilek <sedat.dilek@gmail.com>
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      50e244cc
    • Borislav Petkov's avatar
      x86/intel/cacheinfo: Shut up annoying warning · 84b603ab
      Borislav Petkov authored
      I've been getting the following warning when doing randbuilds
      since forever. Now it finally pissed me off just the perfect
      amount so that I can fix it.
      
        arch/x86/kernel/cpu/intel_cacheinfo.c:489:27: warning: ‘cache_disable_0’ defined but not used [-Wunused-variable]
        arch/x86/kernel/cpu/intel_cacheinfo.c:491:27: warning: ‘cache_disable_1’ defined but not used [-Wunused-variable] arch/x86/kernel/cpu/intel_cacheinfo.c:524:27: warning: ‘subcaches’ defined but not used [-Wunused-variable]
      
      It happens because in randconfigs where CONFIG_SYSFS is not set,
      the whole sysfs-interface to L3 cache index disabling is
      remaining unused and gcc correctly warns about it. Make it
      optional, depending on CONFIG_SYSFS too, as is the case with
      other sysfs-related machinery in this file.
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: Andreas Herrmann <andreas.herrmann3@amd.com>
      Link: http://lkml.kernel.org/r/1359969195-27362-1-git-send-email-bp@alien8.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      84b603ab
    • H. Peter Anvin's avatar
      x86, doc: Boot protocol 2.12 is in 3.8 · 521dfda9
      H. Peter Anvin authored
      The boot protocol 2.12 changes were pulled for 3.8, so update the
      documentation accordingly.
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      521dfda9
    • Jan Beulich's avatar
      x86-64: Replace left over sti/cli in ia32 audit exit code · 313751fa
      Jan Beulich authored
      For some reason they didn't get replaced so far by their
      paravirt equivalents, resulting in code to be run with
      interrupts disabled that doesn't expect so (causing, in the
      observed case, a BUG_ON() to trigger) when syscall auditing is
      enabled.
      
      David (Cc-ed) came up with an identical fix, so likely this can
      be taken to count as an ack from him.
      Reported-by: default avatarPeter Moody <pmoody@google.com>
      Signed-off-by: default avatarJan Beulich <jbeulich@suse.com>
      Cc: David Vrabel <david.vrabel@citrix.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Link: http://lkml.kernel.org/r/5108E01902000078000BA9C5@nat28.tlf.novell.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Cc: stable@vger.kernel.org
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: David Vrabel <david.vrabel@citrix.com>
      Tested-by: default avatarPeter Moody <pmoody@google.com>
      313751fa
    • Dave Airlie's avatar
      Merge tag 'drm-intel-next-2013-02-01' of... · cd17ef41
      Dave Airlie authored
      Merge tag 'drm-intel-next-2013-02-01' of git://people.freedesktop.org/~danvet/drm-intel into drm-next
      
      Daniel writes:
      "Probably the last feature pull for 3.9, there's some fixes outstanding
      thought that I'd like to sneak in. And maybe 3.8 takes a bit longer ...
      Anyway, highlights of this pull:
      - Kill the horrible IS_DISPLAYREG hack to handle the mmio offset movements
        on vlv, big thanks to Ville.
      - Dynamic power well support for Haswell, shaves away a bit when only
        using the eDP port on pipe A (Paulo). Plus unclaimed register fixes
        uncovered by this.
      - Clarifications of the gpu hang/reset state transitions, hopefully fixing
        a few spurious -EIO deaths in userspace.
      - Haswell ELD fixes.
      - Some more (pp)gtt cleanups from Ben.
      - A few smaller things all over.
      
      Plus all the stuff from the previous rather small pull request:
      - Broadcast RBG improvements and reduced color range fixes from Ville.
      - Ben is on a "kill legacy gtt code for good" spree, first pile of patches
        included.
      - No-relocs and bo lut improvements for faster execbuf from Chris.
      - Some refactorings from Imre."
      
      * tag 'drm-intel-next-2013-02-01' of git://people.freedesktop.org/~danvet/drm-intel: (101 commits)
        GPU/i915: Fix acpi_bus_get_device() check in drivers/gpu/drm/i915/intel_opregion.c
        drm/i915: Set the SR01 "screen off" bit in i915_redisable_vga() too
        drm/i915: Kill IS_DISPLAYREG()
        drm/i915: Introduce i915_vgacntrl_reg()
        drm/i915: gen6_gmch_remove can be static
        drm/i915: dynamic Haswell display power well support
        drm/i915: check the power down well on assert_pipe()
        drm/i915: don't send DP "idle" pattern before "normal" on HSW PORT_A
        drm/i915: don't run hsw power well code on !hsw
        drm/i915: kill cargo-culted locking from power well code
        drm/i915: Only run idle processing from i915_gem_retire_requests_worker
        drm/i915: Fix CAGF for HSW
        drm/i915: Reclaim GTT space for failed PPGTT
        drm/i915: remove intel_gtt structure
        drm/i915: Add probe and remove to the gtt ops
        drm/i915: extract hw ppgtt setup/cleanup code
        drm/i915: pte_encode is gen6+
        drm/i915: vfuncs for ppgtt
        drm/i915: vfuncs for gtt_clear_range/insert_entries
        drm/i915: Error state should print /sys/kernel/debug
        ...
      cd17ef41
  2. 04 Feb, 2013 7 commits
  3. 03 Feb, 2013 1 commit
  4. 02 Feb, 2013 1 commit
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · 8b31849a
      Linus Torvalds authored
      Pull scsi target fixes from Nicholas Bellinger:
       "Here's the current set of v3.8-rc fixes in the target-pending.git
        queue.  Apologies in advance for these missing the -rc6 release, and
        having to be destined for -rc7 code.
      
        The majority of these patches are regression bugfixes specific to
        v3.8-rc code changes, namely the zero-length CDB handling breakage
        after the sense_reason_t conversion, and preventing configfs port
        linking for unconfigured devices after the recent struct
        se_subsystem_dev removal.  These is also one (the divide by zero bug
        for unconfigured devices) that is CC'ed to stable."
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
        target: Fix divide by zero bug in fabric_max_sectors for unconfigured devices
        target: Fix regression allowing unconfigured devices to fabric port link
        tcm_vhost: fix pr_err on early kick
        target: Fix zero-length READ_CAPACITY_16 regression
        target: Fix zero-length MODE_SENSE regression
        target: Fix zero-length INQUIRY additional sense code regression
      8b31849a
  5. 01 Feb, 2013 4 commits
  6. 31 Jan, 2013 18 commits
    • Dave Airlie's avatar
      Merge branch 'drm-fixes-3.8' of git://people.freedesktop.org/~agd5f/linux · 089c71a7
      Dave Airlie authored
      Alex writes:
      "A few more radeon fixes for 3.8.  Mostly small stuff.  The big
      change is disabling the use of the DMA ring for VM PT updates.  This
      reverts back to the 3.7 behavior.  Problem is we can get huge PT
      updates in certain cases that are too big for the DMA ring.  I've
      got patches to use an IB for this so I can re-enable the use of the
      DMA ring for VM PT updates in 3.9.  This request also includes the
      patches from the last pull request I sent on Monday in case you haven't
      pulled them yet."
      
      * 'drm-fixes-3.8' of git://people.freedesktop.org/~agd5f/linux:
        drm/radeon: switch back to the CP ring for VM PT updates
        drm/radeon: prevent crash in the ring space allocation
        drm/radeon: Calling object_unrefer() when creating fb failure
        drm/radeon/r5xx-r7xx: wait for the MC to settle after MC blackout
        drm/radeon/evergreen+: wait for the MC to settle after MC blackout
        drm/radeon: protect against div by 0 in backend setup
        drm/radeon: fix backend map setup on 1 RB sumo boards
        drm/radeon: add quirk for RV100 board
        drm/radeon: add WAIT_UNTIL to the non-VM safe regs list for cayman/TN
        drm/radeon: fix MC blackout on evergreen+
      089c71a7
    • Nicholas Bellinger's avatar
      target: Fix divide by zero bug in fabric_max_sectors for unconfigured devices · 7a3cf6ca
      Nicholas Bellinger authored
      This patch fixes a possible divide by zero bug when the fabric_max_sectors
      device attribute is written and backend se_device failed to be successfully
      configured -> enabled.
      
      Go ahead and use block_size=512 within se_dev_set_fabric_max_sectors()
      in the event of a target_configure_device() failure case, as no valid
      dev->dev_attrib.block_size value will have been setup yet.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      7a3cf6ca
    • Nicholas Bellinger's avatar
      target: Fix regression allowing unconfigured devices to fabric port link · faa06ab9
      Nicholas Bellinger authored
      This patch fixes a v3.8-rc1 regression bug where an unconfigured se_device
      was incorrectly allowed to perform a fabric port-link.  This bug was
      introduced in commit:
      
        commit 0fd97ccf
        Author: Christoph Hellwig <hch@infradead.org>
        Date:   Mon Oct 8 00:03:19 2012 -0400
      
            target: kill struct se_subsystem_dev
      
      which ended up dropping the original se_subsystem_dev->se_dev_ptr check
      preventing this from happening with pre commit 0fd97ccf code.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      faa06ab9
    • Linus Torvalds's avatar
      Merge branch 'for-3.8/upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid · cf5425bf
      Linus Torvalds authored
      PullHID fixes from Jiri Kosina:
      
       - fix i2c-hid and hidraw interaction, by Benjamin Tissoires
      
       - a quirk to make a particular device (Formosa IR receiver) work
         properly, by Nicholas Santos
      
      * 'for-3.8/upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
        HID: i2c-hid: fix i2c_hid_output_raw_report
        HID: usbhid: quirk for Formosa IR receiver
        HID: remove x bit from sensor doc
      cf5425bf
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-3.8-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · bf6c8a81
      Linus Torvalds authored
      Pull NFS client bugfixes from Trond Myklebust:
      
       - Error reporting in nfs_xdev_mount incorrectly maps all errors to
         ENOMEM
      
       - Fix an NFSv4 refcounting issue
      
       - Fix a mount failure when the server reboots during NFSv4 trunking
         discovery
      
       - NFSv4.1 mounts may need to run the lease recovery thread.
      
       - Don't silently fail setattr() requests on mountpoints
      
       - Fix a SUNRPC socket/transport livelock and priority queue issue
      
       - We must handle NFS4ERR_DELAY when resetting the NFSv4.1 session.
      
      * tag 'nfs-for-3.8-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        NFSv4.1: Handle NFS4ERR_DELAY when resetting the NFSv4.1 session
        SUNRPC: When changing the queue priority, ensure that we change the owner
        NFS: Don't silently fail setattr() requests on mountpoints
        NFSv4.1: Ensure that nfs41_walk_client_list() does start lease recovery
        NFSv4: Fix NFSv4 trunking discovery
        NFSv4: Fix NFSv4 reference counting for trunked sessions
        NFS: Fix error reporting in nfs_xdev_mount
      bf6c8a81
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · aeb8eede
      Linus Torvalds authored
      Pull MIPS updates from Ralf Baechle:
       "A number of fixes all across the MIPS tree.  No area is particularly
        standing out and things have cooled down quite nicely for a release."
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: Function tracer: Fix broken function tracing
        mips: Move __virt_addr_valid() to a place for MIPS 64
        MIPS: Netlogic: Fix UP compilation on XLR
        MIPS: AR71xx: Fix AR71XX_PCI_MEM_SIZE
        MIPS: AR724x: Fix AR724X_PCI_MEM_SIZE
        MIPS: Lantiq: Fix cp0_perfcount_irq mapping
        MIPS: DSP: Fix DSP mask for registers.
        MIPS: Fix build failure by adding definition of pfn_pmd().
        MIPS: Octeon: Fix warning.
        MIPS: delay.c: Check BITS_PER_LONG instead of __SIZEOF_LONG__
        MIPS: PNX833x: Fix comment.
        MIPS: Add struct p_format to union mips_instruction.
        MIPS: Export <asm/break.h>.
        MIPS: BCM47xx: Enable SSB prerequisite SSB_DRIVER_PCICORE.
        MIPS: BCM47xx: Select GPIOLIB for BCMA on bcm47xx platform
        MIPS: vpe.c: Fix null pointer dereference in print arguments.
      aeb8eede
    • Alex Deucher's avatar
      drm/radeon: switch back to the CP ring for VM PT updates · 3646e420
      Alex Deucher authored
      For large VM page table updates, we can sometimes generate
      more packets than there is space on the ring.  This happens
      more readily with the DMA ring since it is 64K (vs 1M for the
      CP).  For now, switch back to the CP.  For the next kernel,
      I have a patch to utilize IBs for VM PT updates which
      alleviates this problem.
      
      Fixes:
      https://bugs.freedesktop.org/show_bug.cgi?id=58354Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      3646e420
    • Alex Deucher's avatar
      drm/radeon: prevent crash in the ring space allocation · fd5d93a0
      Alex Deucher authored
      If the requested number of DWs on the ring is larger than
      the size of the ring itself, return an error.
      
      In testing with large VM updates, we've seen crashes when we
      try and allocate more space on the ring than the total size
      of the ring without checking.
      
      This prevents the crash but for large VM updates or bo moves
      of very large buffers, we will need to break the transaction
      down into multiple batches.  I have patches to use IBs for
      the next kernel.
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      fd5d93a0
    • liu chuansheng's avatar
      drm/radeon: Calling object_unrefer() when creating fb failure · f2d68cf4
      liu chuansheng authored
      When kzalloc() failed in radeon_user_framebuffer_create(), need to
      call object_unreference() to match the object_reference().
      Signed-off-by: default avatarliu chuansheng <chuansheng.liu@intel.com>
      Signed-off-by: default avatarxueminsu <xuemin.su@intel.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      f2d68cf4
    • Alex Deucher's avatar
      drm/radeon/r5xx-r7xx: wait for the MC to settle after MC blackout · 39dc9aab
      Alex Deucher authored
      Some chips seem to need a little delay after blacking out
      the MC before the requests actually stop. Stop DMAR errors
      reported by Shuah Khan.
      Reported-by: default avatarShuah Khan <shuahkhan@gmail.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      39dc9aab
    • Michael S. Tsirkin's avatar
      tcm_vhost: fix pr_err on early kick · 71f1e45a
      Michael S. Tsirkin authored
      It's OK to get kick before backend is set or after
      it is cleared, we can just ignore it.
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      71f1e45a
    • Benjamin Tissoires's avatar
      HID: i2c-hid: fix i2c_hid_output_raw_report · c284979a
      Benjamin Tissoires authored
      i2c_hid_output_raw_report is used by hidraw to forward set_report requests.
      The current implementation of i2c_hid_set_report needs to take the
      report_id as an argument. The report_id is stored in the first byte
      of the buffer in argument of i2c_hid_output_raw_report.
      
      Not removing the report_id from the given buffer adds this byte 2 times
      in the command, leading to a non working command.
      Reported-by: default avatarAndrew Duggan <aduggan@synaptics.com>
      Signed-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@gmail.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      c284979a
    • Al Cooper's avatar
      MIPS: Function tracer: Fix broken function tracing · 58b69401
      Al Cooper authored
      Function tracing is currently broken for all 32 bit MIPS platforms.
      When tracing is enabled, the kernel immediately hangs on boot.
      This is a result of commit b732d439
      that changes the kernel/trace/Kconfig file so that is no longer
      forces FRAME_POINTER when FUNCTION_TRACING is enabled.
      
      MIPS frame pointers are generally considered to be useless because
      they cannot be used to unwind the stack. Unfortunately the MIPS
      function tracing code has bugs that are masked by the use of frame
      pointers. This commit fixes the bugs so that MIPS frame pointers
      don't need to be enabled.
      
      The bugs are a result of the odd calling sequence used to call the trace
      routine. This calling sequence is inserted into every traceable function
      when the tracing CONFIG option is enabled. This sequence is generated
      for 32bit MIPS platforms by the compiler via the "-pg" flag.
      
      Part of the sequence is "addiu sp,sp,-8" in the delay slot after every
      call to the trace routine "_mcount" (some legacy thing where 2 arguments
      used to be pushed on the stack). The _mcount routine is expected to
      adjust the sp by +8 before returning.  So when not disabled, the original
      jalr and addiu will be there, so _mcount has to adjust sp.
      
      The problem is that when tracing is disabled for a function, the
      "jalr _mcount" instruction is replaced with a nop, but the
      "addiu sp,sp,-8" is still executed and the stack pointer is left
      trashed. When frame pointers are enabled the problem is masked
      because any access to the stack is done through the frame
      pointer and the stack pointer is restored from the frame pointer when
      the function returns.
      
      This patch writes two nops starting at the address of the "jalr _mcount"
      instruction whenever tracing is disabled. This means that the
      "addiu sp,sp.-8" will be converted to a nop along with the "jalr".  When
      disabled, there will be two nops.
      
      This is SMP safe because the first time this happens is during
      ftrace_init() which is before any other processor has been started.
      Subsequent calls to enable/disable tracing when other CPUs ARE running
      will still be safe because the enable will only change the first nop
      to a "jalr" and the disable, while writing 2 nops, will only be changing
      the "jalr". This patch also stops using stop_machine() to call the
      tracer enable/disable routines and calls them directly because the
      routines are SMP safe.
      
      When the kernel first boots we have to be able to handle the gcc
      generated jalr, addui sequence until ftrace_init gets a chance to run
      and change the sequence. At this point mcount just adjusts the stack
      and returns. When ftrace_init runs, we convert the jalr/addui to nops.
      Then whenever tracing is enabled we convert the first nop to a "jalr
      mcount+8". The mcount+8 entry point skips the stack adjust.
      
      [ralf@linux-mips.org: Folded in  Steven Rostedt's build fix.]
      Signed-off-by: default avatarAl Cooper <alcooperx@gmail.com>
      Cc: rostedt@goodmis.org
      Cc: ddaney.cavm@gmail.com
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/4806/
      Patchwork: https://patchwork.linux-mips.org/patch/4841/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      58b69401
    • Alasdair G Kergon's avatar
      dm: fix write same requests counting · fe7af2d3
      Alasdair G Kergon authored
      When processing write same requests, fix dm to send the configured
      number of WRITE SAME requests to the target rather than the number of
      discards, which is not always the same.
      
      Device-mapper WRITE SAME support was introduced by commit
      23508a96 ("dm: add WRITE SAME support").
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
      Acked-by: default avatarMike Snitzer <snitzer@redhat.com>
      fe7af2d3
    • Steven Rostedt's avatar
      mips: Move __virt_addr_valid() to a place for MIPS 64 · 196897a2
      Steven Rostedt authored
      Commit d3ce8843 "MIPS: Fix modpost error in modules attepting to use
      virt_addr_valid()" moved __virt_addr_valid() from a macro in a header
      file to a function in ioremap.c. But ioremap.c is only compiled for MIPS
      32, and not for MIPS 64.
      
      When compiling for my yeeloong2, which supposedly supports hibernation,
      which compiles kernel/power/snapshot.c which calls virt_addr_valid(), I
      got this error:
      
        LD      init/built-in.o
      kernel/built-in.o: In function `memory_bm_free':
      snapshot.c:(.text+0x4c9c4): undefined reference to `__virt_addr_valid'
      snapshot.c:(.text+0x4ca58): undefined reference to `__virt_addr_valid'
      kernel/built-in.o: In function `snapshot_write_next':
      (.text+0x4e44c): undefined reference to `__virt_addr_valid'
      kernel/built-in.o: In function `snapshot_write_next':
      (.text+0x4e890): undefined reference to `__virt_addr_valid'
      make[1]: *** [vmlinux] Error 1
      make: *** [sub-make] Error 2
      
      I suspect that __virt_addr_valid() is fine for mips 64. I moved it to
      mmap.c such that it gets compiled for mips 64 and 32.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/4842/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      196897a2
    • Mike Snitzer's avatar
      dm thin: fix queue limits stacking · 0f640dca
      Mike Snitzer authored
      thin_io_hints() is blindly copying the queue limits from the thin-pool
      which can lead to incorrect limits being set.  The fix here simply
      deletes the thin_io_hints() hook which leaves the existing stacking
      infrastructure to set the limits correctly.
      
      When a thin-pool uses an MD device for the data device a thin device
      from the thin-pool must respect MD's constraints about disallowing a bio
      from spanning multiple chunks.  Otherwise we can see problems.  If the raid0
      chunksize is 1152K and thin-pool chunksize is 256K I see the following
      md/raid0 error (with extra debug tracing added to thin_endio) when
      mkfs.xfs is executed against the thin device:
      
      md/raid0:md99: make_request bug: can't convert block across chunks or bigger than 1152k 6688 127
      device-mapper: thin: bio sector=2080 err=-5 bi_size=130560 bi_rw=17 bi_vcnt=32 bi_idx=0
      
      This extra DM debugging shows that the failing bio is spanning across
      the first and second logical 1152K chunk (sector 2080 + 255 takes the
      bio beyond the first chunk's boundary of sector 2304).  So the bio
      splitting that DM is doing clearly isn't respecting the MD limits.
      
      max_hw_sectors_kb is 127 for both the thin-pool and thin device
      (queue_max_hw_sectors returns 255 so we'll excuse sysfs's lack of
      precision).  So this explains why bi_size is 130560.
      
      But the thin device's max_hw_sectors_kb should be 4 (PAGE_SIZE) given
      that it doesn't have a .merge function (for bio_add_page to consult
      indirectly via dm_merge_bvec) yet the thin-pool does sit above an MD
      device that has a compulsory merge_bvec_fn.  This scenario is exactly
      why DM must resort to sending single PAGE_SIZE bios to the underlying
      layer. Some additional context for this is available in the header for
      commit 8cbeb67a ("dm: avoid unsupported spanning of md stripe boundaries").
      
      Long story short, the reason a thin device doesn't properly get
      configured to have a max_hw_sectors_kb of 4 (PAGE_SIZE) is that
      thin_io_hints() is blindly copying the queue limits from the thin-pool
      device directly to the thin device's queue limits.
      
      Fix this by eliminating thin_io_hints.  Doing so is safe because the
      block layer's queue limits stacking already enables the upper level thin
      device to inherit the thin-pool device's discard and minimum_io_size and
      optimal_io_size limits that get set in pool_io_hints.  But avoiding the
      queue limits copy allows the thin and thin-pool limits to be different
      where it is important, namely max_hw_sectors_kb.
      Reported-by: default avatarDaniel Browning <db@kavod.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
      0f640dca
    • Alex Deucher's avatar
      drm/radeon/evergreen+: wait for the MC to settle after MC blackout · ed39fadd
      Alex Deucher authored
      Some chips seem to need a little delay after blacking out
      the MC before the requests actually stop.
      
      May fix:
      https://bugs.freedesktop.org/show_bug.cgi?id=56139
      https://bugs.freedesktop.org/show_bug.cgi?id=57567Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      ed39fadd
    • Ville Syrjälä's avatar
      drm/i915: Set the SR01 "screen off" bit in i915_redisable_vga() too · 209d5211
      Ville Syrjälä authored
      From BSpec / SR01 - Clocking Mode:
      "The following sequence must be used when disabling the VGA plane.
       Write SR01 to set bit 5 = 1 to disable video output.
       Wait for 100us.
       Disable the VGA plane via Bit 31 of the MMIO VGA control."
      
      So simply call i915_disable_vga() from i915_redisable_vga().
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      209d5211