1. 06 Jan, 2016 5 commits
  2. 18 Dec, 2015 8 commits
  3. 05 Dec, 2015 12 commits
  4. 16 Nov, 2015 10 commits
    • Julia Lawall's avatar
      dmaengine: ioatdma: constify dca_ops structures · 2bb129eb
      Julia Lawall authored
      The dca_ops structure is never modified, so declare it as const.
      
      Done with the help of Coccinelle.
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Acked-by: default avatarDan Williams <dan.j.williams@intel.com>
      Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
      2bb129eb
    • Dave Jiang's avatar
      dmaengine: IOATDMA: Cleanup pre v3.0 chansts register reads · d3cd63f9
      Dave Jiang authored
      Remove pre-3.0 channel status reads. 3.0 and later chansts register
      is 64bit and can be read 64bit. This was clarified with the hardware
      architects and since the driver now only support 3.0+ we don't need the
      legacy support
      Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
      Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
      d3cd63f9
    • Robert Jarzmik's avatar
      dmaengine: pxa_dma: declare transfer are reusable · d3651b8e
      Robert Jarzmik authored
      As this driver provides a mechanism to reuse transfers, declare it in
      its probe function.
      Signed-off-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
      d3651b8e
    • Robert Jarzmik's avatar
      dmaengine: enable DMA_CTRL_REUSE · 9eeacd3a
      Robert Jarzmik authored
      In the current state, the capability of transfer reuse can neither be
      set by a slave dmaengine driver, nor used by a client driver, because
      the capability is not available to dma_get_slave_caps().
      
      Fix this by adding a way to declare the capability.
      
      Fixes: 27242021 ("dmaengine: Add DMA_CTRL_REUSE")
      Signed-off-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
      9eeacd3a
    • Robert Jarzmik's avatar
      dmaengine: virt-dma: don't always free descriptor upon completion · 13bb26ae
      Robert Jarzmik authored
      This patch attempts to enhance the case of a transfer submitted multiple
      times, and where the cost of creating the descriptors chain is not
      negligible.
      
      This happens with big video buffers (several megabytes, ie. several
      thousands of linked descriptors in one scatter-gather list). In these
      cases, a video driver would want to do :
       - tx = dmaengine_prep_slave_sg()
       - dma_engine_submit(tx);
       - dma_async_issue_pending()
       - wait for video completion
       - read video data (or not, skipping a frame is also possible)
       - dma_engine_submit(tx)
         => here, the descriptors chain recalculation will take time
         => the dma coherent allocation over and over might create holes in
            the dma pool, which is counter-productive.
       - dma_async_issue_pending()
       - etc ...
      
      In order to cope with this case, virt-dma is modified to prevent freeing
      the descriptors upon completion if DMA_CTRL_REUSE flag is set in the
      transfer.
      
      This patch is a respin of the former DMA_CTRL_ACK approach, which was
      reverted due to a regression in audio drivers.
      Signed-off-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
      13bb26ae
    • Lars-Peter Clausen's avatar
      ALSA: pcm_dmaengine: Properly synchronize DMA on shutdown · bc0e7345
      Lars-Peter Clausen authored
      Use the new dmaengine_synchronize() function to make sure that all complete
      callbacks have finished running before the runtime data, which is accessed
      in the completed callback, is freed.
      
      This fixes a long standing use-after-free race condition that has been
      observed on some systems.
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Reviewed-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
      bc0e7345
    • Lars-Peter Clausen's avatar
      dmaengine: axi_dmac: Add synchronization support · 860dd64c
      Lars-Peter Clausen authored
      Implement the new device_synchronize() callback to allow proper
      synchronization when stopping a channel. Since the driver already makes
      sure that no new complete callbacks are scheduled after the
      device_terminate_all() callback has been called, all left to do in the
      device_synchronize() callback is to wait for all currently running complete
      callbacks to finish.
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
      860dd64c
    • Lars-Peter Clausen's avatar
      dmaengine: virt-dma: Add synchronization helper function · 2ed08629
      Lars-Peter Clausen authored
      Add a synchronize helper function for the virt-dma library. The function
      makes sure that any scheduled descriptor complete callbacks have finished
      running before the function returns.
      
      This needs to be called by drivers using virt-dma in their
      device_synchronize() callback. Depending on the driver additional
      operations might be necessary in addition to calling vchan_synchronize() to
      ensure proper synchronization.
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
      2ed08629
    • Lars-Peter Clausen's avatar
      dmaengine: Add transfer termination synchronization support · b36f09c3
      Lars-Peter Clausen authored
      The DMAengine API has a long standing race condition that is inherent to
      the API itself. Calling dmaengine_terminate_all() is supposed to stop and
      abort any pending or active transfers that have previously been submitted.
      Unfortunately it is possible that this operation races against a currently
      running (or with some drivers also scheduled) completion callback.
      
      Since the API allows dmaengine_terminate_all() to be called from atomic
      context as well as from within a completion callback it is not possible to
      synchronize to the execution of the completion callback from within
      dmaengine_terminate_all() itself.
      
      This means that a user of the DMAengine API does not know when it is safe
      to free resources used in the completion callback, which can result in a
      use-after-free race condition.
      
      This patch addresses the issue by introducing an explicit synchronization
      primitive to the DMAengine API called dmaengine_synchronize().
      
      The existing dmaengine_terminate_all() is deprecated in favor of
      dmaengine_terminate_sync() and dmaengine_terminate_async(). The former
      aborts all pending and active transfers and synchronizes to the current
      context, meaning it will wait until all running completion callbacks have
      finished. This means it is only possible to call this function from
      non-atomic context. The later function does not synchronize, but can still
      be used in atomic context or from within a complete callback. It has to be
      followed up by dmaengine_synchronize() before a client can free the
      resources used in a completion callback.
      
      In addition to this the semantics of the device_terminate_all() callback
      are slightly relaxed by this patch. It is now OK for a driver to only
      schedule the termination of the active transfer, but does not necessarily
      have to wait until the DMA controller has completely stopped. The driver
      must ensure though that the controller has stopped and no longer accesses
      any memory when the device_synchronize() callback returns.
      
      This was in part done since most drivers do not pay attention to this
      anyway at the moment and to emphasize that this needs to be done when the
      device_synchronize() callback is implemented. But it also helps with
      implementing support for devices where stopping the controller can require
      operations that may sleep.
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
      b36f09c3
    • Linus Torvalds's avatar
      Linux 4.4-rc1 · 8005c49d
      Linus Torvalds authored
      8005c49d
  5. 15 Nov, 2015 5 commits
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 0ca9b676
      Linus Torvalds authored
      Pull perf updates from Thomas Gleixner:
       "Mostly updates to the perf tool plus two fixes to the kernel core code:
      
         - Handle tracepoint filters correctly for inherited events (Peter
           Zijlstra)
      
         - Prevent a deadlock in perf_lock_task_context (Paul McKenney)
      
         - Add missing newlines to some pr_err() calls (Arnaldo Carvalho de
           Melo)
      
         - Print full source file paths when using 'perf annotate --print-line
           --full-paths' (Michael Petlan)
      
         - Fix 'perf probe -d' when just one out of uprobes and kprobes is
           enabled (Wang Nan)
      
         - Add compiler.h to list.h to fix 'make perf-tar-src-pkg' generated
           tarballs, i.e. out of tree building (Arnaldo Carvalho de Melo)
      
         - Add the llvm-src-base.c and llvm-src-kbuild.c files, generated by
           the 'perf test' LLVM entries, when running it in-tree, to
           .gitignore (Yunlong Song)
      
         - libbpf error reporting improvements, using a strerror interface to
           more precisely tell the user about problems with the provided
           scriptlet, be it in C or as a ready made object file (Wang Nan)
      
         - Do not be case sensitive when searching for matching 'perf test'
           entries (Arnaldo Carvalho de Melo)
      
         - Inform the user about objdump failures in 'perf annotate' (Andi
           Kleen)
      
         - Improve the LLVM 'perf test' entry, introduce a new ones for BPF
           and kbuild tests to check the environment used by clang to compile
           .c scriptlets (Wang Nan)"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (32 commits)
        perf/x86/intel/rapl: Remove the unused RAPL_EVENT_DESC() macro
        tools include: Add compiler.h to list.h
        perf probe: Verify parameters in two functions
        perf session: Add missing newlines to some pr_err() calls
        perf annotate: Support full source file paths for srcline fix
        perf test: Add llvm-src-base.c and llvm-src-kbuild.c to .gitignore
        perf: Fix inherited events vs. tracepoint filters
        perf: Disable IRQs across RCU RS CS that acquires scheduler lock
        perf test: Do not be case sensitive when searching for matching tests
        perf test: Add 'perf test BPF'
        perf test: Enhance the LLVM tests: add kbuild test
        perf test: Enhance the LLVM test: update basic BPF test program
        perf bpf: Improve BPF related error messages
        perf tools: Make fetch_kernel_version() publicly available
        bpf tools: Add new API bpf_object__get_kversion()
        bpf tools: Improve libbpf error reporting
        perf probe: Cleanup find_perf_probe_point_from_map to reduce redundancy
        perf annotate: Inform the user about objdump failures in --stdio
        perf stat: Make stat options global
        perf sched latency: Fix thread pid reuse issue
        ...
      0ca9b676
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 051b29f2
      Linus Torvalds authored
      Pull scheduler fix from Thomas Gleixner:
       "A single fix to prevent math underflow in the numa balancing code"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/numa: Fix math underflow in task_tick_numa()
      051b29f2
    • Linus Torvalds's avatar
      Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 8f98e292
      Linus Torvalds authored
      Pull liblockdep fixes from Thomas Gleixner:
       "Three small patches to synchronize liblockdep with the latest core
        changes"
      
      * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        tools/liblockdep: explicitly declare lockdep API we call from liblockdep
        tools/liblockdep: add userspace versions of WRITE_ONCE and RCU_INIT_POINTER
        tools/liblockdep: remove task argument from debug_check_no_locks_held
      8f98e292
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · bba072df
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "A couple of fixes and updates related to x86:
      
         - Fix the W+X check regression on XEN
      
         - The real fix for the low identity map trainwreck
      
         - Probe legacy PIC early instead of unconditionally allocating legacy
           irqs
      
         - Add cpu verification to long mode entry
      
         - Adjust the cache topology to AMD Fam17H systems
      
         - Let Merrifield use the TSC across S3"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/cpu: Call verify_cpu() after having entered long mode too
        x86/setup: Fix low identity map for >= 2GB kernel range
        x86/mm: Skip the hypervisor range when walking PGD
        x86/AMD: Fix last level cache topology for AMD Fam17h systems
        x86/irq: Probe for PIC presence before allocating descs for legacy IRQs
        x86/cpu/intel: Enable X86_FEATURE_NONSTOP_TSC_S3 for Merrifield
      bba072df
    • Linus Torvalds's avatar
      Merge branches 'irq-urgent-for-linus' and 'timers-urgent-for-linus' of... · 511601bd
      Linus Torvalds authored
      Merge branches 'irq-urgent-for-linus' and 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
      
      Pull irq and timer fixes from Thomas Gleixner:
      
       - An irq regression fix to restore the wakeup behaviour of chained
         interrupts.
      
       - A timer fix for a long standing race versus timers scheduled on a
         target cpu which got exposed by recent changes in the workqueue
         implementation.
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        genirq/PM: Restore system wake up from chained interrupts
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        timers: Use proper base migration in add_timer_on()
      511601bd