22 Sep, 2020

4 commits

  • There is no need to have a conditional for boolean expression when
    function returns bool. Drop unnecessary code and return boolean
    result directly.

    While at it, drop unneeded casting from void *.

    Cc: Vladimir Murzin
    Signed-off-by: Andy Shevchenko
    Tested-by: Peter Ujfalusi
    Link: https://lore.kernel.org/r/20200922115847.30100-3-andriy.shevchenko@linux.intel.com
    Signed-off-by: Vinod Koul

    Andy Shevchenko
     
  • After writing a garbage to the channel we get an Oops in dmatest_chan_set()
    due to access to last entry in the empty list.

    [ 212.670672] BUG: unable to handle page fault for address: fffffff000000020
    [ 212.677562] #PF: supervisor read access in kernel mode
    [ 212.682702] #PF: error_code(0x0000) - not-present page
    ...
    [ 212.710074] RIP: 0010:dmatest_chan_set+0x149/0x2d0 [dmatest]
    [ 212.715739] Code: e8 cc f9 ff ff 48 8b 1d 0d 55 00 00 48 83 7b 10 00 0f 84 63 01 00 00 48 c7 c7 d0 65 4d c0 e8 ee 4a f5 e1 48 89 c6 48 8b 43 10 8b 40 20 48 8b 78 58 48 85 ff 0f 84 f5 00 00 00 e8 b1 41 f5 e1

    Fix this by checking list for emptiness before accessing its last entry.

    Fixes: d53513d5dc28 ("dmaengine: dmatest: Add support for multi channel testing")
    Cc: Vladimir Murzin
    Signed-off-by: Andy Shevchenko
    Tested-by: Peter Ujfalusi
    Link: https://lore.kernel.org/r/20200922115847.30100-2-andriy.shevchenko@linux.intel.com
    Signed-off-by: Vinod Koul

    Andy Shevchenko
     
  • Vinod Koul
     
  • Andy reported that commit 6b41030fdc79 ("dmaengine: dmatest:
    Restore default for channel") broke his scripts for the case
    where "busy" channel is used for configuration with expectation
    that run command would do nothing. Instead, behavior was
    (unintentionally) changed to treat such case as under-configuration
    and progress with defaults, i.e. run command would start a test
    with default setting for channel (which would use all channels).

    Restore original behavior with tracking status of channel setter
    so we can distinguish between misconfigured and under-configured
    cases in run command and act accordingly.

    Fixes: 6b41030fdc79 ("dmaengine: dmatest: Restore default for channel")
    Reported-by: Andy Shevchenko
    Tested-by: Andy Shevchenko
    Signed-off-by: Vladimir Murzin
    Tested-by: Peter Ujfalusi
    Signed-off-by: Andy Shevchenko
    Link: https://lore.kernel.org/r/20200922115847.30100-1-andriy.shevchenko@linux.intel.com
    Signed-off-by: Vinod Koul

    Vladimir Murzin
     

11 Sep, 2020

1 commit

  • When we got an error from DMA mapping API we convert a negative value
    to unsigned long type and hence make user confused:

    result #1: 'src mapping error' with src_off=0x19a72 dst_off=0xea len=0xccf4 (18446744073709551604)

    Change this to print error codes as signed values.

    Signed-off-by: Andy Shevchenko
    Link: https://lore.kernel.org/r/20200907101306.61824-1-andriy.shevchenko@linux.intel.com
    Signed-off-by: Vinod Koul

    Andy Shevchenko
     

05 Aug, 2020

1 commit


06 Jul, 2020

1 commit

  • The completed threads were not cleared and consequent run would result
    threads accumulating:

    echo 800000 > /sys/module/dmatest/parameters/test_buf_size
    echo 2000 > /sys/module/dmatest/parameters/timeout
    echo 50 > /sys/module/dmatest/parameters/iterations
    echo 1 > /sys/module/dmatest/parameters/max_channels
    echo "" > /sys/module/dmatest/parameters/channel
    [ 237.507265] dmatest: Added 1 threads using dma1chan2
    echo 1 > /sys/module/dmatest/parameters/run
    [ 244.713360] dmatest: Started 1 threads using dma1chan2
    [ 246.117680] dmatest: dma1chan2-copy0: summary 50 tests, 0 failures 2437.47 iops 977623 KB/s (0)

    echo 1 > /sys/module/dmatest/parameters/run
    [ 292.381471] dmatest: No channels configured, continue with any
    [ 292.389307] dmatest: Added 1 threads using dma1chan3
    [ 292.394302] dmatest: Started 1 threads using dma1chan2
    [ 292.399454] dmatest: Started 1 threads using dma1chan3
    [ 293.800835] dmatest: dma1chan3-copy0: summary 50 tests, 0 failures 2624.53 iops 975014 KB/s (0)

    echo 1 > /sys/module/dmatest/parameters/run
    [ 307.301429] dmatest: No channels configured, continue with any
    [ 307.309212] dmatest: Added 1 threads using dma1chan4
    [ 307.314197] dmatest: Started 1 threads using dma1chan2
    [ 307.319343] dmatest: Started 1 threads using dma1chan3
    [ 307.324492] dmatest: Started 1 threads using dma1chan4
    [ 308.730773] dmatest: dma1chan4-copy0: summary 50 tests, 0 failures 2390.28 iops 965436 KB/s (0)

    Fixes: 6b41030fdc79 ("dmaengine: dmatest: Restore default for channel")
    Reported-by: Grygorii Strashko
    Signed-off-by: Peter Ujfalusi
    Link: https://lore.kernel.org/r/20200701101225.8607-1-peter.ujfalusi@ti.com
    Signed-off-by: Vinod Koul

    Peter Ujfalusi
     

17 Jun, 2020

1 commit

  • The cookie tracking in dmaengine expects all submissions completed in
    order. Some DMA devices like Intel DSA can complete submissions out of
    order, especially if configured with a work queue sharing multiple DMA
    engines. Add a status DMA_OUT_OF_ORDER that tx_status can be returned for
    those DMA devices. The user should use callbacks to track the completion
    rather than the DMA cookie. This would address the issue of dmatest
    complaining that descriptors are "busy" when the cookie count goes
    backwards due to out of order completion. Add DMA_COMPLETION_NO_ORDER
    DMA capability to allow the driver to flag the device's ability to complete
    operations out of order.

    Reported-by: Swathi Kovvuri
    Signed-off-by: Dave Jiang
    Tested-by: Swathi Kovvuri
    Link: https://lore.kernel.org/r/158939557151.20335.12404113976045569870.stgit@djiang5-desk3.ch.intel.com
    Signed-off-by: Vinod Koul

    Dave Jiang
     

11 Jun, 2020

1 commit

  • Pull dmaengine updates from Vinod Koul:
    "A fairly small dmaengine update which includes mostly driver updates
    (dmatest, dw-edma, ioat, mmp-tdma and k3-udma) along with Renesas
    binding update to json-schema"

    * tag 'dmaengine-5.8-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (39 commits)
    dmaengine: imx-sdma: initialize all script addresses
    dmaengine: ti: k3-udma: Use proper return code in alloc_chan_resources
    dmaengine: ti: k3-udma: Remove udma_chan.in_ring_cnt
    dmaengine: ti: k3-udma: Add missing dma_sync call for rx flush descriptor
    dmaengine: at_xdmac: Replace zero-length array with flexible-array
    dmaengine: at_hdmac: Replace zero-length array with flexible-array
    dmaengine: qcom: bam_dma: Replace zero-length array with flexible-array
    dmaengine: ti: k3-udma: Use PTR_ERR_OR_ZERO() to simplify code
    dmaengine: moxart-dma: Drop pointless static qualifier in moxart_probe()
    dmaengine: sf-pdma: Simplify the error handling path in 'sf_pdma_probe()'
    dmaengine: qcom_hidma: use true,false for bool variable
    dmaengine: dw-edma: support local dma device transfer semantics
    dmaengine: Fix doc strings to satisfy validation script
    dmaengine: Include dmaengine.h into dmaengine.c
    dmaengine: dmatest: Describe members of struct dmatest_info
    dmaengine: dmatest: Describe members of struct dmatest_params
    dmaengine: dmatest: Allow negative timeout value to specify infinite wait
    Revert "dmaengine: dmatest: timeout value of -1 should specify infinite wait"
    dmaengine: stm32-dma: direct mode support through device tree
    dt-bindings: dma: add direct mode support through device tree in stm32-dma
    ...

    Linus Torvalds
     

13 May, 2020

1 commit

  • In case of dmatest is built-in and no channel was configured test
    doesn't run with:

    dmatest: Could not start test, no channels configured

    Even though description to "channel" parameter claims that default is
    any.

    Add default channel back as it used to be rather than reject test with
    no channel configuration.

    Fixes: d53513d5dc285d9a95a534fc41c5c08af6b60eac ("dmaengine: dmatest: Add support for multi channel testing)
    Reported-by: Dijil Mohan
    Signed-off-by: Vladimir Murzin
    Link: https://lore.kernel.org/r/20200429071522.58148-1-vladimir.murzin@arm.com
    Signed-off-by: Vinod Koul

    Vladimir Murzin
     

29 Apr, 2020

1 commit

  • If we do

    % echo 1 > /sys/module/dmatest/parameters/run
    [ 115.851124] dmatest: Could not start test, no channels configured

    % echo dma8chan7 > /sys/module/dmatest/parameters/channel
    [ 127.563872] dmatest: Added 1 threads using dma8chan7

    % cat /sys/module/dmatest/parameters/wait
    ... !!! HANG !!! ...

    The culprit is the commit 6138f967bccc

    ("dmaengine: dmatest: Use fixed point div to calculate iops")

    which makes threads not to run, but pending and being kicked off by writing
    to the 'run' node. However, it forgot to consider 'wait' routine to avoid
    above mentioned case.

    In order to fix this, check for really running threads, i.e. with pending
    and done flags unset.

    It's pity the culprit commit hadn't updated documentation and tested all
    possible scenarios.

    Fixes: 6138f967bccc ("dmaengine: dmatest: Use fixed point div to calculate iops")
    Cc: Seraj Alijan
    Signed-off-by: Andy Shevchenko
    Link: https://lore.kernel.org/r/20200428113518.70620-1-andriy.shevchenko@linux.intel.com
    Signed-off-by: Vinod Koul

    Andy Shevchenko
     

28 Apr, 2020

5 commits

  • Kernel documentation validator complains that not all members of
    struct dmatest_info are being described. Describe them all.

    Signed-off-by: Andy Shevchenko
    Link: https://lore.kernel.org/r/20200424161147.16895-6-andriy.shevchenko@linux.intel.com
    Signed-off-by: Vinod Koul

    Andy Shevchenko
     
  • Kernel documentation validator complains that not all members of
    struct dmatest_params are being described. Describe them all.

    Signed-off-by: Andy Shevchenko
    Link: https://lore.kernel.org/r/20200424161147.16895-5-andriy.shevchenko@linux.intel.com
    Signed-off-by: Vinod Koul

    Andy Shevchenko
     
  • The dmatest module parameter 'timeout' is documented as accepting a -1 to mean
    "infinite timeout". However, an infinite timeout is not advised, nor possible
    since the module parameter is an unsigned int, which won't accept a negative
    value. Change the parameter type to be signed integer.

    Cc: Gary Hook
    Signed-off-by: Andy Shevchenko
    Link: https://lore.kernel.org/r/20200424161147.16895-4-andriy.shevchenko@linux.intel.com
    Signed-off-by: Vinod Koul

    Andy Shevchenko
     
  • This reverts commit ed04b7c57c3383ed4573f1d1d1dbdc1108ba0bed.

    While it gives a good description what happens, the approach seems too
    confusing. Let's fix it in the following patch.

    Cc: Gary Hook
    Signed-off-by: Andy Shevchenko
    Link: https://lore.kernel.org/r/20200424161147.16895-3-andriy.shevchenko@linux.intel.com
    Signed-off-by: Vinod Koul

    Andy Shevchenko
     
  • Under some circumstances, i.e. when test is still running and about to
    time out and user runs, for example,

    grep -H . /sys/module/dmatest/parameters/*

    the iterations parameter is not respected and test is going on and on until
    user gives

    echo 0 > /sys/module/dmatest/parameters/run

    This is not what expected.

    The history of this bug is interesting. I though that the commit
    2d88ce76eb98 ("dmatest: add a 'wait' parameter")
    is a culprit, but looking closer to the code I think it simple revealed the
    broken logic from the day one, i.e. in the commit
    0a2ff57d6fba ("dmaengine: dmatest: add a maximum number of test iterations")
    which adds iterations parameter.

    So, to the point, the conditional of checking the thread to be stopped being
    first part of conjunction logic prevents to check iterations. Thus, we have to
    always check both conditions to be able to stop after given iterations.

    Since it wasn't visible before second commit appeared, I add a respective
    Fixes tag.

    Fixes: 2d88ce76eb98 ("dmatest: add a 'wait' parameter")
    Cc: Dan Williams
    Cc: Nicolas Ferre
    Signed-off-by: Andy Shevchenko
    Acked-by: Nicolas Ferre
    Link: https://lore.kernel.org/r/20200424161147.16895-1-andriy.shevchenko@linux.intel.com
    Signed-off-by: Vinod Koul

    Andy Shevchenko
     

04 Sep, 2019

1 commit

  • With the polled parameter the DMA drivers can be tested if they can work
    correctly when no completion is requested (no DMA_PREP_INTERRUPT and no
    callback is provided).

    If polled mode is selected then use dma_sync_wait() to execute the test
    iteration instead of relying on the completion callback.

    Signed-off-by: Peter Ujfalusi
    Link: https://lore.kernel.org/r/20190731071438.24075-1-peter.ujfalusi@ti.com
    Signed-off-by: Vinod Koul

    Peter Ujfalusi
     

18 Jul, 2019

1 commit

  • Pull dmaengine updates from Vinod Koul:

    - Add support in dmaengine core to do device node checks for DT devices
    and update bunch of drivers to use that and remove open coding from
    drivers

    - New driver/driver support for new hardware, namely:
    - MediaTek UART APDMA
    - Freescale i.mx7ulp edma2
    - Synopsys eDMA IP core version 0
    - Allwinner H6 DMA

    - Updates to axi-dma and support for interleaved cyclic transfers

    - Greg's debugfs return value check removals on drivers

    - Updates to stm32-dma, hsu, dw, pl330, tegra drivers

    * tag 'dmaengine-5.3-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (68 commits)
    dmaengine: Revert "dmaengine: fsl-edma: add i.mx7ulp edma2 version support"
    dmaengine: at_xdmac: check for non-empty xfers_list before invoking callback
    Documentation: dmaengine: clean up description of dmatest usage
    dmaengine: tegra210-adma: remove PM_CLK dependency
    dmaengine: fsl-edma: add i.mx7ulp edma2 version support
    dt-bindings: dma: fsl-edma: add new i.mx7ulp-edma
    dmaengine: fsl-edma-common: version check for v2 instead
    dmaengine: fsl-edma-common: move dmamux register to another single function
    dmaengine: fsl-edma: add drvdata for fsl-edma
    dmaengine: Revert "dmaengine: fsl-edma: support little endian for edma driver"
    dmaengine: rcar-dmac: Reject zero-length slave DMA requests
    dmaengine: dw: Enable iDMA 32-bit on Intel Elkhart Lake
    dmaengine: dw-edma: fix semicolon.cocci warnings
    dmaengine: sh: usb-dmac: Use [] to denote a flexible array member
    dmaengine: dmatest: timeout value of -1 should specify infinite wait
    dmaengine: dw: Distinguish ->remove() between DW and iDMA 32-bit
    dmaengine: fsl-edma: support little endian for edma driver
    dmaengine: hsu: Revert "set HSU_CH_MTSR to memory width"
    dmagengine: pl330: add code to get reset property
    dt-bindings: pl330: document the optional resets property
    ...

    Linus Torvalds
     

25 Jun, 2019

1 commit

  • The dmatest module parameter 'timeout' is documented as accepting a
    -1 to mean "infinite timeout". However, an infinite timeout is not
    advised, nor possible since the module parameter is an unsigned int,
    which won't accept a negative value. Change the parameter
    comment to reflect current behavior, which allows values from 0 up to
    4294967295 (0xFFFFFFFF).

    Signed-off-by: Gary R Hook
    Signed-off-by: Vinod Koul

    Hook, Gary
     

19 Jun, 2019

1 commit

  • Based on 2 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation #

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 4122 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Enrico Weigelt
    Reviewed-by: Kate Stewart
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

15 Mar, 2019

1 commit

  • Pull dmaengine updates from Vinod Koul:

    - dmatest updates for modularizing common struct and code

    - remove SG support for VDMA xilinx IP and updates to driver

    - Update to dw driver to support Intel iDMA controllers multi-block
    support

    - tegra updates for proper reporting of residue

    - Add Snow Ridge ioatdma device id and support for IOATDMA v3.4

    - struct_size() usage and useless LIST_HEAD cleanups in subsystem.

    - qDMA controller driver for Layerscape SoCs

    - stm32-dma PM Runtime support

    - And usual updates to imx-sdma, sprd, Documentation, fsl-edma,
    bcm2835, qcom_hidma etc

    * tag 'dmaengine-5.1-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (81 commits)
    dmaengine: imx-sdma: fix consistent dma test failures
    dmaengine: imx-sdma: add a test for imx8mq multi sdma devices
    dmaengine: imx-sdma: add clock ratio 1:1 check
    dmaengine: dmatest: move test data alloc & free into functions
    dmaengine: dmatest: add short-hand `buf_size` var in dmatest_func()
    dmaengine: dmatest: wrap src & dst data into a struct
    dmaengine: ioatdma: support latency tolerance report (LTR) for v3.4
    dmaengine: ioatdma: add descriptor pre-fetch support for v3.4
    dmaengine: ioatdma: disable DCA enabling on IOATDMA v3.4
    dmaengine: ioatdma: Add Snow Ridge ioatdma device id
    dmaengine: sprd: Change channel id to slave id for DMA cell specifier
    dt-bindings: dmaengine: sprd: Change channel id to slave id for DMA cell specifier
    dmaengine: mv_xor: Use correct device for DMA API
    Documentation :dmaengine: clarify DMA desc. pointer after submission
    Documentation: dmaengine: fix dmatest.rst warning
    dmaengine: k3dma: Add support for dma-channel-mask
    dmaengine: k3dma: Delete axi_config
    dmaengine: k3dma: Upgrade k3dma driver to support hisi_asp_dma hardware
    Documentation: bindings: dma: Add binding for dma-channel-mask
    Documentation: bindings: k3dma: Extend the k3dma driver binding to support hisi-asp
    ...

    Linus Torvalds
     

26 Feb, 2019

3 commits


04 Feb, 2019

1 commit

  • In case of mapping error the DMA addresses are invalid and continuing
    will screw system memory or potentially something else.

    [ 222.480310] dmatest: dma0chan7-copy0: summary 1 tests, 3 failures 6 iops 349 KB/s (0)
    ...
    [ 240.912725] check: Corrupted low memory at 00000000c7c75ac9 (2940 phys) = 5656000000000000
    [ 240.921998] check: Corrupted low memory at 000000005715a1cd (2948 phys) = 279f2aca5595ab2b
    [ 240.931280] check: Corrupted low memory at 000000002f4024c0 (2950 phys) = 5e5624f349e793cf
    ...

    Abort any test if mapping failed.

    Fixes: 4076e755dbec ("dmatest: convert to dmaengine_unmap_data")
    Cc: Dan Williams
    Signed-off-by: Andy Shevchenko
    Signed-off-by: Vinod Koul

    Andy Shevchenko
     

17 Dec, 2018

4 commits

  • Existing transfer size "len" is either generated randomly or set to the
    size of test_buf_size. In some cases we need to explicitly specify a
    transfer size that is different from the buffer size and non aligned to
    test the target device's ability to handle unaligned transfers.

    This patch adds optional parameter "transfer_size" to allow setting
    explicit transfer size for dma transfers.

    Signed-off-by: Seraj Alijan
    Signed-off-by: Vinod Koul

    Seraj Alijan
     
  • Add parameter "alignment" to allow setting the address alignment
    manually. Having the ability to configure address alignment from
    user space adds new testing capabilities where different alignments can
    be configured for testing without having to modify the dma device
    alignment properties.

    If configured, the alignment value will override the device alignment
    property of the target device.

    Signed-off-by: Seraj Alijan
    Signed-off-by: Vinod Koul

    Seraj Alijan
     
  • Use fixed point division to calculate iops to prevent reporting 0 iops
    when operations last for longer than a second.

    Signed-off-by: Seraj Alijan
    Signed-off-by: Vinod Koul

    Seraj Alijan
     
  • Add support for running tests on multiple channels simultaneously as the
    driver currently limits to 1 channel per test run. This will add support
    for stress testing DMA controllers with multi channel capabilities.

    This is done by adding a callback function to the "channel" parameter
    that registers the requested channel prior to the "run" parameter being
    set to 1. Each time the "channel" parameter is populated with a new
    dma channel, a new test is appended to the thread queue. Once the "run"
    parameter is set to 1, the test will kick start all pending threads.

    Signed-off-by: Seraj Alijan
    Signed-off-by: Vinod Koul

    Seraj Alijan
     

05 Dec, 2018

1 commit

  • We recently moved the test size tests around but it means we need to
    adjust the error handling as well or we leak the "pq_coefs" memory. I
    updated the label name to reflect that we're freeing coefs.

    Fixes: 787d3083caf8 ("dmaengine: dmatest: move size checks earlier in function")
    Signed-off-by: Dan Carpenter
    Signed-off-by: Vinod Koul

    Dan Carpenter
     

24 Nov, 2018

3 commits


16 Apr, 2018

1 commit

  • There's an ongoing effort to remove VLAs from the kernel
    (https://lkml.org/lkml/2018/3/7/621) to eventually turn on -Wvla.
    The test already pre-allocates some buffers with kmalloc so turn
    the two VLAs in to pre-allocated kmalloc buffers.

    Signed-off-by: Laura Abbott
    Reviewed-by: Sinan Kaya
    Signed-off-by: Vinod Koul

    Laura Abbott
     

12 Feb, 2018

1 commit

  • Existing option noverify disables both random src/dst address offset
    setup and data verification. Sometimes, we need to control random
    src/dst address setup and verification separately, such as disabling
    random to make sure that test covers addresses in all interleaving
    banks, but data verification is still performed.

    This patch adds option norandom to disable random offset setup. Option
    noverify has been changed to disable data verification only.

    Cc: Joey Zheng
    Signed-off-by: Yang Shunyong
    Signed-off-by: Vinod Koul

    Yang Shunyong
     

30 Jan, 2018

1 commit


11 Dec, 2017

1 commit

  • Commit adfa543e7314 ("dmatest: don't use set_freezable_with_signal()")
    introduced a bug (that is in fact documented by the patch commit text)
    that leaves behind a dangling pointer. Since the done_wait structure is
    allocated on the stack, future invocations to the DMATEST can produce
    undesirable results (e.g., corrupted spinlocks).

    Commit a9df21e34b42 ("dmaengine: dmatest: warn user when dma test times
    out") attempted to WARN the user that the stack was likely corrupted but
    did not fix the actual issue.

    This patch fixes the issue by pushing the wait queue and callback
    structs into the the thread structure. If a failure occurs due to time,
    dmaengine_terminate_all will force the callback to safely call
    wake_up_all() without possibility of using a freed pointer.

    Cc: stable@vger.kernel.org
    Bug: https://bugzilla.kernel.org/show_bug.cgi?id=197605
    Fixes: adfa543e7314 ("dmatest: don't use set_freezable_with_signal()")
    Reviewed-by: Sinan Kaya
    Suggested-by: Shunyong Yang
    Signed-off-by: Adam Wallis
    Signed-off-by: Vinod Koul

    Adam Wallis
     

08 Nov, 2017

1 commit

  • Commit adfa543e7314 ("dmatest: don't use set_freezable_with_signal()")
    introduced a bug (that is in fact documented by the patch commit text)
    that leaves behind a dangling pointer. Since the done_wait structure is
    allocated on the stack, future invocations to the DMATEST can produce
    undesirable results (e.g., corrupted spinlocks). Ideally, this would be
    cleaned up in the thread handler, but at the very least, the kernel
    is left in a very precarious scenario that can lead to some long debug
    sessions when the crash comes later.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=197605
    Signed-off-by: Adam Wallis
    Signed-off-by: Vinod Koul

    Adam Wallis
     

22 Aug, 2017

1 commit


19 Jul, 2017

1 commit

  • Introducing memset test into dmatest. This change allows us to test
    memset capable HW using the dmatest test procedure. The new dmatest
    value for memset is 2 and it is not the default value.

    Memset support patch shares the same code path as the other dmatest
    code to reuse as much as we can.

    The first value inside the source buffer is used as a pattern
    to fill in the destination buffer space.

    Prior to running the test, source/destination buffers are initialized
    in the current code.

    "The remaining bits are the inverse of a counter which increments by
    one for each byte address."

    Memset test will fill in the upper bits of pattern with the inverse of
    fixed counter value 1 as opposed to an incrementing value in a loop.

    An example run is as follows:

    echo dma0chan0 > /sys/module/dmatest/parameters/channel
    echo 2 > /sys/module/dmatest/parameters/dmatest
    echo 2000 > /sys/module/dmatest/parameters/timeout
    echo 10 > /sys/module/dmatest/parameters/iterations
    echo 1 > /sys/module/dmatest/parameters/run

    Reviewed-by: Andy Shevchenko
    Signed-off-by: Sinan Kaya
    Signed-off-by: Vinod Koul

    Sinan Kaya