1. 10 12月, 2015 1 次提交
    • J
      ipmi: move timer init to before irq is setup · 27f972d3
      Jan Stancek 提交于
      We encountered a panic on boot in ipmi_si on a dell per320 due to an
      uninitialized timer as follows.
      
      static int smi_start_processing(void       *send_info,
                                      ipmi_smi_t intf)
      {
              /* Try to claim any interrupts. */
              if (new_smi->irq_setup)
                      new_smi->irq_setup(new_smi);
      
       --> IRQ arrives here and irq handler tries to modify uninitialized timer
      
          which triggers BUG_ON(!timer->function) in __mod_timer().
      
       Call Trace:
         <IRQ>
         [<ffffffffa0532617>] start_new_msg+0x47/0x80 [ipmi_si]
         [<ffffffffa053269e>] start_check_enables+0x4e/0x60 [ipmi_si]
         [<ffffffffa0532bd8>] smi_event_handler+0x1e8/0x640 [ipmi_si]
         [<ffffffff810f5584>] ? __rcu_process_callbacks+0x54/0x350
         [<ffffffffa053327c>] si_irq_handler+0x3c/0x60 [ipmi_si]
         [<ffffffff810efaf0>] handle_IRQ_event+0x60/0x170
         [<ffffffff810f245e>] handle_edge_irq+0xde/0x180
         [<ffffffff8100fc59>] handle_irq+0x49/0xa0
         [<ffffffff8154643c>] do_IRQ+0x6c/0xf0
         [<ffffffff8100ba53>] ret_from_intr+0x0/0x11
      
              /* Set up the timer that drives the interface. */
              setup_timer(&new_smi->si_timer, smi_timeout, (long)new_smi);
      
      The following patch fixes the problem.
      
      To: Openipmi-developer@lists.sourceforge.net
      To: Corey Minyard <minyard@acm.org>
      CC: linux-kernel@vger.kernel.org
      Signed-off-by: NJan Stancek <jstancek@redhat.com>
      Signed-off-by: NTony Camuso <tcamuso@redhat.com>
      Signed-off-by: NCorey Minyard <cminyard@mvista.com>
      Cc: stable@vger.kernel.org # Applies cleanly to 3.10-, needs small rework before
      27f972d3
  2. 09 12月, 2015 1 次提交
  3. 08 12月, 2015 1 次提交
    • G
      of/fdt: Add mutex protection for calls to __unflatten_device_tree() · f8062386
      Guenter Roeck 提交于
      __unflatten_device_tree() calls unflatten_dt_node(), which declares
      a static variable. It is therefore not reentrant.
      
      One of the callers of __unflatten_device_tree(), unflatten_device_tree(),
      is only called once during early initialization and does not need to be
      protected. The other caller, of_fdt_unflatten_tree(), can be called at
      any time, possibly multiple times in parallel. This can happen, for
      example, if multiple devicetree overlays have to be loaded and installed.
      
      Without this protection, errors such as the following may be seen.
      
      kernel: End of tree marker overwritten: e6a3a458
      kernel: find_target_node:
      	Failed to find target-indirect node at /fragment@0
      kernel: __of_overlay_create: of_build_overlay_info() failed for tree@/
      
      Add a mutex to of_fdt_unflatten_tree() to make the call reentrant.
      
      Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Cc: stable@vger.kernel.org # v4.1+
      Signed-off-by: NRob Herring <robh@kernel.org>
      f8062386
  4. 07 12月, 2015 9 次提交
    • V
      virtio_ring: shadow available ring flags & index · f277ec42
      Venkatesh Srinivas 提交于
      Improves cacheline transfer flow of available ring header.
      
      Virtqueues are implemented as a pair of rings, one producer->consumer
      avail ring and one consumer->producer used ring; preceding the
      avail ring in memory are two contiguous u16 fields -- avail->flags
      and avail->idx. A producer posts work by writing to avail->idx and
      a consumer reads avail->idx.
      
      The flags and idx fields only need to be written by a producer CPU
      and only read by a consumer CPU; when the producer and consumer are
      running on different CPUs and the virtio_ring code is structured to
      only have source writes/sink reads, we can continuously transfer the
      avail header cacheline between 'M' states between cores. This flow
      optimizes core -> core bandwidth on certain CPUs.
      
      (see: "Software Optimization Guide for AMD Family 15h Processors",
      Section 11.6; similar language appears in the 10h guide and should
      apply to CPUs w/ exclusive caches, using LLC as a transfer cache)
      
      Unfortunately the existing virtio_ring code issued reads to the
      avail->idx and read-modify-writes to avail->flags on the producer.
      
      This change shadows the flags and index fields in producer memory;
      the vring code now reads from the shadows and only ever writes to
      avail->flags and avail->idx, allowing the cacheline to transfer
      core -> core optimally.
      
      In a concurrent version of vring_bench, the time required for
      10,000,000 buffer checkout/returns was reduced by ~2% (average
      across many runs) on an AMD Piledriver (15h) CPU:
      
      (w/o shadowing):
       Performance counter stats for './vring_bench':
           5,451,082,016      L1-dcache-loads
           ...
             2.221477739 seconds time elapsed
      
      (w/ shadowing):
       Performance counter stats for './vring_bench':
           5,405,701,361      L1-dcache-loads
           ...
             2.168405376 seconds time elapsed
      
      The further away (in a NUMA sense) virtio producers and consumers are
      from each other, the more we expect to benefit. Physical implementations
      of virtio devices and implementations of virtio where the consumer polls
      vring avail indexes (vhost) should also benefit.
      Signed-off-by: NVenkatesh Srinivas <venkateshs@google.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      f277ec42
    • M
      virtio: Do not drop __GFP_HIGH in alloc_indirect · 82107539
      Michal Hocko 提交于
      b92b1b89 ("virtio: force vring descriptors to be allocated from
      lowmem") tried to exclude highmem pages for descriptors so it cleared
      __GFP_HIGHMEM from a given gfp mask. The patch also cleared __GFP_HIGH
      which doesn't make much sense for this fix because __GFP_HIGH only
      controls access to memory reserves and it doesn't have any influence
      on the zone selection. Some of the call paths use GFP_ATOMIC and
      dropping __GFP_HIGH will reduce their changes for success because the
      lack of access to memory reserves.
      Signed-off-by: NMichal Hocko <mhocko@suse.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Reviewed-by: NMel Gorman <mgorman@techsingularity.net>
      82107539
    • M
      vhost: replace % with & on data path · 5fba13b5
      Michael S. Tsirkin 提交于
      We know vring num is a power of 2, so use &
      to mask the high bits.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      5fba13b5
    • S
      virtio: fix memory leak of virtio ida cache layers · c13f99b7
      Suman Anna 提交于
      The virtio core uses a static ida named virtio_index_ida for
      assigning index numbers to virtio devices during registration.
      The ida core may allocate some internal idr cache layers and
      an ida bitmap upon any ida allocation, and all these layers are
      truely freed only upon the ida destruction. The virtio_index_ida
      is not destroyed at present, leading to a memory leak when using
      the virtio core as a module and atleast one virtio device is
      registered and unregistered.
      
      Fix this by invoking ida_destroy() in the virtio core module
      exit.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NSuman Anna <s-anna@ti.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      c13f99b7
    • M
      vhost: relax log address alignment · d5424838
      Michael S. Tsirkin 提交于
      commit 5d9a07b0 ("vhost: relax used
      address alignment") fixed the alignment for the used virtual address,
      but not for the physical address used for logging.
      
      That's a mistake: alignment should clearly be the same for virtual and
      physical addresses,
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      d5424838
    • A
      ata/sata_fsl.c: add ATA_FLAG_NO_LOG_PAGE to blacklist the controller for log page reads · 4f2568f5
      Andreas Werner 提交于
      Every attempt to issue a read log page command lockup the controller.
      The command is currently sent if the sata device includes the devlsp feature
      to read out the timing data.
      This attempt to read the data, locks up the controller and the device
      is not recognzied correctly (failed to set xfermode) and cannot be accessed.
      
      This was found on Freescale P1013/P1022 and T4240 CPUs
      using a ATP IG mSATA 4GB with the devslp feature.
      
      fsl-sata ff718000.sata: Sata FSL Platform/CSB Driver init
      [    1.254195] scsi0 : sata_fsl
      [    1.256004] ata1: SATA max UDMA/133 irq 74
      [    1.370666] fsl-gianfar ethernet.3: enabled errata workarounds, flags: 0x4
      [    1.470671] fsl-gianfar ethernet.4: enabled errata workarounds, flags: 0x4
      [    1.775584] ata1: Signature Update detected @ 504 msecs
      [    1.947594] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
      [    1.948366] ata1.00: ATA-8: ATP IG mSATA, 20150311, max UDMA/133
      [    1.948371] ata1.00: 7732368 sectors, multi 0: LBA
      [    1.948843] ata1.00: failed to get Identify Device Data, Emask 0x1
      [    1.948857] ata1.00: failed to set xfermode (err_mask=0x40)
      [    7.467557] ata1: Signature Update detected @ 504 msecs
      [    7.639560] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
      [    7.651320] ata1.00: failed to get Identify Device Data, Emask 0x1
      [    7.651360] ata1.00: failed to set xfermode (err_mask=0x40)
      [    7.655628] ata1: limiting SATA link speed to 1.5 Gbps
      [    7.659458] ata1.00: limiting speed to UDMA/133:PIO3
      [   13.163554] ata1: Signature Update detected @ 504 msecs
      [   13.335558] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
      [   13.347298] ata1.00: failed to get Identify Device Data, Emask 0x1
      [   13.347334] ata1.00: failed to set xfermode (err_mask=0x40)
      [   13.351601] ata1.00: disabled
      [   13.353278] ata1: exception Emask 0x50 SAct 0x0 SErr 0x800 action 0x6 frozen t4
      [   13.359281] ata1: SError: { HostInt }
      [   13.361644] ata1: hard resetting link
      Signed-off-by: NAndreas Werner <andreas.werner@men.de>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      4f2568f5
    • A
      libata-eh.c: Introduce new ata port flag for controller which lockup on read log page · ea013a9b
      Andreas Werner 提交于
      Some controller lockup on a ata_read_log_page.
      Add new ata port flag ATA_FLAG_NO_LOG_PAGE which can used
      to blacklist a controller.
      
      If this flag is set, any attempt to read a log page returns an error
      without actually issuing the command.
      Signed-off-by: NAndreas Werner <andreas.werner@men.de>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      ea013a9b
    • M
      virtio-net: Stop doing DMA from the stack · 2ac46030
      Michael S. Tsirkin 提交于
      Once virtio starts using the DMA API, we won't be able to safely DMA
      from the stack.  virtio-net does a couple of config DMA requests
      from small stack buffers -- switch to using dynamically-allocated
      memory.
      
      This should have no effect on any performance-critical code paths.
      Reported-by: NAndy Lutomirski <luto@kernel.org>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Tested-by: NAndy Lutomirski <luto@kernel.org>
      
      2ac46030
    • J
      staging/lustre: remove IOC_LIBCFS_PING_TEST ioctl · d035e336
      James Simmons 提交于
      The ioctl IOC_LIBCFS_PING_TEST has not been used in ages.  The recent
      nidstring changes which moved all the nidstring operations from libcfs
      to the LNet layer but this ioctl code was still using an nidstring
      operation that was causing a circular dependency loop between libcfs and
      LNet.
      Signed-off-by: NJames Simmons <jsimmons@infradead.org>
      Signed-off-by: NOleg Drokin <green@linuxhacker.ru>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d035e336
  5. 05 12月, 2015 13 次提交
    • L
      PCI: altera: Fix error when INTx is 4 · 99496bd2
      Ley Foon Tan 提交于
      PCI interrupt lines start at 1, not at 0.  So, creates additional one
      interrupt when register for irq domain.
      
      Error when PCIe devices have 4 INTx:
      
        WARNING: CPU: 1 PID: 1 at kernel/irq/irqdomain.c:280
          irq_domain_associate+0x17c/0x1cc()
        error: hwirq 0x4 is too large for dummy
      
      Tested on Ethernet adapter card with multi-functions.
      Signed-off-by: NLey Foon Tan <lftan@altera.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      99496bd2
    • L
      PCI: altera: Check TLP completion status · ea1d3795
      Ley Foon Tan 提交于
      Check TLP packet successful completion status.  This fix the issue when
      accessing multi-function devices in enumeration process, TLP will return
      error when accessing non-exist function number.  Returns PCI error code
      instead of generic errno.
      
      Tested on Ethernet adapter card with multi-functions.
      
      [bhelgaas: simplify completion status checking code]
      Signed-off-by: NLey Foon Tan <lftan@altera.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      ea1d3795
    • L
      PCI: altera: Fix Requester ID for config accesses · 23ec5670
      Ley Foon Tan 提交于
      The Requester ID should use the Root Port devfn and it should be always 0.
      Previously we constructed the Requester ID using the *Completer* devfn,
      i.e., the devfn of the Function we expect to respond to the config access.
      This causes issues when accessing configuration space for devices other
      than the Root Port.
      
      Build the Requester ID using the Root Port devfn.
      
      Tested on Ethernet adapter card with multi-functions.
      Signed-off-by: NLey Foon Tan <lftan@altera.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      23ec5670
    • D
      PCI: altera: Fix loop in tlp_read_packet() · 7f52f314
      Dan Carpenter 提交于
      TLP_LOOP is 500 and the "loop" variable was a u8 so "loop < TLP_LOOP" is
      always true.  We only need this condition to work if there is a problem so
      it would have been easy to miss this in testing.
      
      Make it a normal for loop with "int i" instead of over thinking things and
      making it complicated.
      
      Fixes: 6bb4dd154ae8 ("PCI: altera: Add Altera PCIe host controller driver")
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NLey Foon Tan <lftan@altera.com>
      7f52f314
    • A
      drm/amdgpu: Fixup hw vblank counter/ts for new drm_update_vblank_count() (v3) · 8e36f9d3
      Alex Deucher 提交于
      commit 4dfd6486 "drm: Use vblank timestamps to guesstimate how many
      vblanks were missed" introduced in Linux 4.4-rc1 makes the drm core
      more fragile to drivers which don't update hw vblank counters and
      vblank timestamps in sync with firing of the vblank irq and
      essentially at leading edge of vblank.
      
      This exposed a problem with radeon-kms/amdgpu-kms which do not
      satisfy above requirements:
      
      The vblank irq fires a few scanlines before start of vblank, but
      programmed pageflips complete at start of vblank and
      vblank timestamps update at start of vblank, whereas the
      hw vblank counter increments only later, at start of vsync.
      
      This leads to problems like off by one errors for vblank counter
      updates, vblank counters apparently going backwards or vblank
      timestamps apparently having time going backwards. The net result
      is stuttering of graphics in games, or little hangs, as well as
      total failure of timing sensitive applications.
      
      See bug #93147 for an example of the regression on Linux 4.4-rc:
      
      https://bugs.freedesktop.org/show_bug.cgi?id=93147
      
      This patch tries to align all above events better from the
      viewpoint of the drm core / of external callers to fix the problem:
      
      1. The apparent start of vblank is shifted a few scanlines earlier,
      so the vblank irq now always happens after start of this extended
      vblank interval and thereby drm_update_vblank_count() always samples
      the updated vblank count and timestamp of the new vblank interval.
      
      To achieve this, the reporting of scanout positions by
      radeon_get_crtc_scanoutpos() now operates as if the vblank starts
      radeon_crtc->lb_vblank_lead_lines before the real start of the hw
      vblank interval. This means that the vblank timestamps which are based
      on these scanout positions will now update at this earlier start of
      vblank.
      
      2. The driver->get_vblank_counter() function will bump the returned
      vblank count as read from the hw by +1 if the query happens after
      the shifted earlier start of the vblank, but before the real hw increment
      at start of vsync, so the counter appears to increment at start of vblank
      in sync with the timestamp update.
      
      3. Calls from vblank irq-context and regular non-irq calls are now
      treated identical, always simulating the shifted vblank start, to
      avoid inconsistent results for queries happening from vblank irq vs.
      happening from drm_vblank_enable() or vblank_disable_fn().
      
      4. The radeon_flip_work_func will delay mmio programming a pageflip until
      the start of the real vblank iff it happens to execute inside the shifted
      earlier start of the vblank, so pageflips now also appear to execute at
      start of the shifted vblank, in sync with vblank counter and timestamp
      updates. This to avoid some races between updates of vblank count and
      timestamps that are used for swap scheduling and pageflip execution which
      could cause pageflips to execute before the scheduled target vblank.
      
      The lb_vblank_lead_lines "fudge" value is calculated as the size of
      the display controllers line buffer in scanlines for the given video
      mode: Vblank irq's are triggered by the line buffer logic when the line
      buffer refill for a video frame ends, ie. when the line buffer source read
      position enters the hw vblank. This means that a vblank irq could fire at
      most as many scanlines before the current reported scanout position of the
      crtc timing generator as the number of scanlines the line buffer can
      maximally hold for a given video mode.
      
      This patch has been successfully tested on a RV730 card with DCE-3 display
      engine and on a evergreen card with DCE-4 display engine, in single-display
      and dual-display configuration, with different video modes.
      
      A similar patch is needed for amdgpu-kms to fix the same problem.
      
      Limitations:
      
      - Maybe replace the udelay() in the flip_work_func() by a suitable
        usleep_range() for a bit better efficiency? Will try that.
      
      - Line buffer sizes in pixels are hard-coded on < DCE-4 to a value
        i just guessed to be high enough to work ok, lacking info on the true
        sizes atm.
      
      Probably fixes: fdo#93147
      
      Port of Mario's radeon fix to amdgpu.
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      (v1) Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>
      
      (v2) Refine amdgpu_flip_work_func() for better efficiency.
      
           In amdgpu_flip_work_func, replace the busy waiting udelay(5)
           with event lock held by a more performance and energy efficient
           usleep_range() until at least predicted true start of hw vblank,
           with some slack for scheduler happiness. Release the event lock
           during waits to not delay other outputs in doing their stuff, as
           the waiting can last up to 200 usecs in some cases.
      
           Also small fix to code comment and formatting in that function.
      
      (v2) Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
      
      (v3) Fix crash in crtc disabled case
      8e36f9d3
    • M
      drm/radeon: Fixup hw vblank counter/ts for new drm_update_vblank_count() (v2) · 5b5561b3
      Mario Kleiner 提交于
      commit 4dfd6486 "drm: Use vblank timestamps to guesstimate how many
      vblanks were missed" introduced in Linux 4.4-rc1 makes the drm core
      more fragile to drivers which don't update hw vblank counters and
      vblank timestamps in sync with firing of the vblank irq and
      essentially at leading edge of vblank.
      
      This exposed a problem with radeon-kms/amdgpu-kms which do not
      satisfy above requirements:
      
      The vblank irq fires a few scanlines before start of vblank, but
      programmed pageflips complete at start of vblank and
      vblank timestamps update at start of vblank, whereas the
      hw vblank counter increments only later, at start of vsync.
      
      This leads to problems like off by one errors for vblank counter
      updates, vblank counters apparently going backwards or vblank
      timestamps apparently having time going backwards. The net result
      is stuttering of graphics in games, or little hangs, as well as
      total failure of timing sensitive applications.
      
      See bug #93147 for an example of the regression on Linux 4.4-rc:
      
      https://bugs.freedesktop.org/show_bug.cgi?id=93147
      
      This patch tries to align all above events better from the
      viewpoint of the drm core / of external callers to fix the problem:
      
      1. The apparent start of vblank is shifted a few scanlines earlier,
      so the vblank irq now always happens after start of this extended
      vblank interval and thereby drm_update_vblank_count() always samples
      the updated vblank count and timestamp of the new vblank interval.
      
      To achieve this, the reporting of scanout positions by
      radeon_get_crtc_scanoutpos() now operates as if the vblank starts
      radeon_crtc->lb_vblank_lead_lines before the real start of the hw
      vblank interval. This means that the vblank timestamps which are based
      on these scanout positions will now update at this earlier start of
      vblank.
      
      2. The driver->get_vblank_counter() function will bump the returned
      vblank count as read from the hw by +1 if the query happens after
      the shifted earlier start of the vblank, but before the real hw increment
      at start of vsync, so the counter appears to increment at start of vblank
      in sync with the timestamp update.
      
      3. Calls from vblank irq-context and regular non-irq calls are now
      treated identical, always simulating the shifted vblank start, to
      avoid inconsistent results for queries happening from vblank irq vs.
      happening from drm_vblank_enable() or vblank_disable_fn().
      
      4. The radeon_flip_work_func will delay mmio programming a pageflip until
      the start of the real vblank iff it happens to execute inside the shifted
      earlier start of the vblank, so pageflips now also appear to execute at
      start of the shifted vblank, in sync with vblank counter and timestamp
      updates. This to avoid some races between updates of vblank count and
      timestamps that are used for swap scheduling and pageflip execution which
      could cause pageflips to execute before the scheduled target vblank.
      
      The lb_vblank_lead_lines "fudge" value is calculated as the size of
      the display controllers line buffer in scanlines for the given video
      mode: Vblank irq's are triggered by the line buffer logic when the line
      buffer refill for a video frame ends, ie. when the line buffer source read
      position enters the hw vblank. This means that a vblank irq could fire at
      most as many scanlines before the current reported scanout position of the
      crtc timing generator as the number of scanlines the line buffer can
      maximally hold for a given video mode.
      
      This patch has been successfully tested on a RV730 card with DCE-3 display
      engine and on a evergreen card with DCE-4 display engine, in single-display
      and dual-display configuration, with different video modes.
      
      A similar patch is needed for amdgpu-kms to fix the same problem.
      
      Limitations:
      
      - Line buffer sizes in pixels are hard-coded on < DCE-4 to a value
        i just guessed to be high enough to work ok, lacking info on the true
        sizes atm.
      
      Fixes: fdo#93147
      Signed-off-by: NMario Kleiner <mario.kleiner.de@gmail.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Michel Dänzer <michel.daenzer@amd.com>
      Cc: Harry Wentland <Harry.Wentland@amd.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      
      (v1) Tested-by: Dave Witbrodt <dawitbro@sbcglobal.net>
      
      (v2) Refine radeon_flip_work_func() for better efficiency:
      
           In radeon_flip_work_func, replace the busy waiting udelay(5)
           with event lock held by a more performance and energy efficient
           usleep_range() until at least predicted true start of hw vblank,
           with some slack for scheduler happiness. Release the event lock
           during waits to not delay other outputs in doing their stuff, as
           the waiting can last up to 200 usecs in some cases.
      
           Retested on DCE-3 and DCE-4 to verify it still works nicely.
      
      (v2) Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      5b5561b3
    • L
      drm/radeon: Retry DDC probing on DVI on failure if we got an HPD interrupt · cb5d4166
      Lyude 提交于
      HPD signals on DVI ports can be fired off before the pins required for
      DDC probing actually make contact, due to the pins for HPD making
      contact first. This results in a HPD signal being asserted but DDC
      probing failing, resulting in hotplugging occasionally failing.
      
      This is somewhat rare on most cards (depending on what angle you plug
      the DVI connector in), but on some cards it happens constantly. The
      Radeon R5 on the machine used for testing this patch for instance, runs
      into this issue just about every time I try to hotplug a DVI monitor and
      as a result hotplugging almost never works.
      
      Rescheduling the hotplug work for a second when we run into an HPD
      signal with a failing DDC probe usually gives enough time for the rest
      of the connector's pins to make contact, and fixes this issue.
      Reviewed-by: NChristian König <christian.koenig@amd.com>
      Signed-off-by: NLyude <cpaul@redhat.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      cb5d4166
    • J
      drm/amdgpu: add spin lock to protect freed list in vm (v2) · 81d75a30
      jimqu 提交于
      there is a protection fault about freed list when OCL test.
      add a spin lock to protect it.
      
      v2: drop changes in vm_fini
      Signed-off-by: NJimQu <jim.qu@amd.com>
      Reviewed-by: NChristian König <christian.koenig@amd.com>
      81d75a30
    • C
      drm/amdgpu: partially revert "drm/amdgpu: fix VM_CONTEXT*_PAGE_TABLE_END_ADDR" v2 · 9c97b5ab
      Christian König 提交于
      The gtt_end is already inclusive, we don't need to subtract one here.
      
      v2 (chk): keep the fix for the VM code, cause here it really applies.
      Signed-off-by: NChristian König <christian.koenig@amd.com>
      Signed-off-by: NAnatoli Antonovitch <anatoli.antonovitch@amd.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      9c97b5ab
    • C
      drm/amdgpu: take a BO reference for the user fence · f3f17692
      Christian König 提交于
      No need for a GEM reference here.
      Reviewed-by: NMichel Dänzer <michel.daenzer@amd.com>
      Signed-off-by: NChristian König <christian.koenig@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      f3f17692
    • C
      drm/amdgpu: take a BO reference in the display code · e9d951a8
      Christian König 提交于
      No need for the GEM reference here.
      Reviewed-by: NMichel Dänzer <michel.daenzer@amd.com>
      Signed-off-by: NChristian König <christian.koenig@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      e9d951a8
    • C
      drm/amdgpu: set snooped flags only on system addresses v2 · 6d99905a
      Christian König 提交于
      Not necessary for VRAM.
      
      v2: no need to check if ttm is NULL.
      Signed-off-by: NChristian König <christian.koenig@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      6d99905a
    • M
      PCI/MSI: Only use the generic MSI layer when domain is hierarchical · 3845d295
      Marc Zyngier 提交于
      Since d8a1cb75 ("PCI/MSI: Let pci_msi_get_domain use struct
      device::msi_domain"), we use the MSI domain associated with the PCI device.
      
      But finding an MSI domain doesn't mean that the domain is implemented using
      the generic MSI domain API, and a number of MSI controllers are still using
      arch_setup_msi_irq() and arch_teardown_msi_irqs().
      
      Check that the domain we just obtained is hierarchical.  If it is, we can
      use the new generic MSI stuff.  Otherwise we have to fall back to the old
      arch_setup_msi_irq() and arch_teardown_msi_irqs() interfaces.
      
      This avoids an oops in msi_domain_alloc_irqs() on systems with R-Car,
      Tegra, Armada 370, and probably other DesignWare-based host controllers.
      
      Fixes: d8a1cb75 ("PCI/MSI: Let pci_msi_get_domain use struct device::msi_domain")
      Reported-by: NPhil Edworthy <phil.edworthy@renesas.com>
      Tested-by: NPhil Edworthy <phil.edworthy@renesas.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      CC: stable@vger.kernel.org	# v4.3+
      3845d295
  6. 04 12月, 2015 10 次提交
  7. 03 12月, 2015 5 次提交