This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM5728: dmatest not working

Part Number: AM5728

Tool/software: Linux

Hi all,

I want to test the edma under linux.

But it seems no edma test program inside the kernel.

So I used the dmatest follow /Documentation/dmatest.txt

like this :

insmod dmatest.ko                        
echo dma0chan0 > /sys/module/dmatest/parameters/channel        
echo 2000 > /sys/module/dmatest/parameters/timeout                  
echo 1 > /sys/module/dmatest/parameters/iterations               
echo 1 > /sys/module/dmatest/parameters/verbose                  
echo 1 > /sys/module/dmatest/parameters/run      

but there nothing output.

cat /sys/module/dmatest/parameters/run
N

It seems the dmatest not working. Could you please help me? thanks!


BR,

Denny

  • Hi Denny,

    Which SDK are you using?

    Best Regards,
    Yordan
  • I used ti-processor-sdk-linux-am57xx-evm-03.03.00.04
    thanks!
  • Hi,

    Let me try this on my side, to see if I'll reproduce your issue.

    Best Regards,
    Yordan
  • Hi Yordan,

    Does this issue have any progress?

    thanks!

    BR,
    Denny

  • Hi Yordan,

    Do you have any update about this issue? thanks!

    BR,
    Denny

  • I have tested on the last sdk

    PROCESSOR-SDK-LINUX-AM57X  04_00_00_04

    it's the same.

    Could you please help about this? thanks!

  • Hi,

    I had to transfer to other tasks. I tested this on my side & it is the same. I don't have a solution yet.

    Best Regards,
    Yordan
  • Hi Yordan,

    Customer want to use edma carry data from pcie to ddr under Linux OS.

    I want to modify dmatest for this. If dmatest is not working. Do you have any other suggestions about this? thanks!

    BR,
    Denny

  • Hi, Denny,

    The dmatest.c code is meant to refer as an example. The system test drop the test case using dmatest because it is developed internally and need to modify with Kernel version. The dma testing is now embedded in crypto performance test. With EDMA enabled, if Crypto performance number is low, it implies DMA is not working. I am trying to collect more info on our dma tests from system test, but customer should be able to use dmatest.c as example.

    Rex
  • Hi Rex,

    I want to give customer a useable edma demo under Linux. Could you please help about this? thanks!

    BR,
    Denny

  • Hi, Denny,

    The way system test verify edma working is through Crypto performance test which shows the edma interrupt (edma_ccint) increases after the test. The logs are shown below. The generic dmatest is not used and has been removed from top level build. I submitted a jira for it.

    cat /proc/interrupts
    CPU0 CPU1
    17: 0 0 CBAR 32 Level gp_timer
    18: 0 0 GIC-0 29 Level arch_timer
    19: 841795 2172460 GIC-0 30 Level arch_timer
    22: 0 0 CBAR 4 Level l3-dbg-irq
    23: 0 0 WUGEN 10 Level l3-app-irq
    25: 1 0 CBAR 232 Level dra7xx-pcie-main
    26: 0 0 CBAR 233 Level dra7-pcie-msi
    27: 1 0 CBAR 121 Level talert
    29: 0 0 CBAR 8 Level omap-dma-engine
    32: 1 0 CBAR 361 Level 43300000.edma_ccint
    34: 0 0 CBAR 359 Level 43300000.edma_ccerrint


    root@am57xx-evm:/test# modprobe tcrypt mode=500 sec=1
    [80169.707808]
    [80169.707808] testing speed of async ecb(aes) (ecb-aes-omap) encryption
    [80169.715773] test 0 (128 bit key, 16 byte blocks): 630707 operations in 1 seconds (10091312 bytes)
    [80170.722281] test 1 (128 bit key, 64 byte blocks): 331086 operations in 1 seconds (21189504 bytes)
    [80171.722252] test 2 (128 bit key, 256 byte blocks): 12278 operations in 1 seconds (3143168 bytes)
    [80172.722120] test 3 (128 bit key, 1024 byte blocks): 7571 operations in 1 seconds (7752704 bytes)
    [80173.722070] test 4 (128 bit key, 8192 byte blocks): 3628 operations in 1 seconds (29720576 bytes)
    [80174.722281] test 5 (192 bit key, 16 byte blocks): 598873 operations in 1 seconds (9581968 bytes)
    [80175.722155] test 6 (192 bit key, 64 byte blocks): 303737 operations in 1 seconds (19439168 bytes)
    [80176.722243] test 7 (192 bit key, 256 byte blocks): 14753 operations in 1 seconds (3776768 bytes)
    [80177.722106] test 8 (192 bit key, 1024 byte blocks): 7323 operations in 1 seconds (7498752 bytes)
    [80178.722058] test 9 (192 bit key, 8192 byte blocks): 2960 operations in 1 seconds (24248320 bytes)
    [80179.722328] test 10 (256 bit key, 16 byte blocks): 580537 operations in 1 seconds (9288592 bytes)
    [80180.722168] test 11 (256 bit key, 64 byte blocks): 279123 operations in 1 seconds (17863872 bytes)
    [80181.722241] test 12 (256 bit key, 256 byte blocks): 8371 operations in 1 seconds (2142976 bytes)
    [80182.721983] test 13 (256 bit key, 1024 byte blocks): 7175 operations in 1 seconds (7347200 bytes)
    [80183.721995] test 14 (256 bit key, 8192 byte blocks): 3253 operations in 1 seconds (26648576 bytes)
    [80184.722237]
    [80184.722237] testing speed of async ecb(aes) (ecb-aes-omap) decryption
    (more logs omitted)

    root@am57xx-evm:/test# cat /proc/interrupts
    CPU0 CPU1
    17: 0 0 CBAR 32 Level gp_timer
    18: 0 0 GIC-0 29 Level arch_timer
    19: 847049 2178678 GIC-0 30 Level arch_timer
    22: 0 0 CBAR 4 Level l3-dbg-irq
    23: 0 0 WUGEN 10 Level l3-app-irq
    25: 1 0 CBAR 232 Level dra7xx-pcie-main
    26: 0 0 CBAR 233 Level dra7-pcie-msi
    27: 1 0 CBAR 121 Level talert
    29: 0 0 CBAR 8 Level omap-dma-engine
    32: 437509 0 CBAR 361 Level 43300000.edma_ccint
    34: 0 0 CBAR 359 Level 43300000.edma_ccerrint
  • Hi, Denny,

    I tried with ProcSDK 3.3.0.6 (not the latest) on AM572x GP EVM. THe dmatest works. Please see logs below. The issue you encountered is because dma0chan0 is used.

    root@am57xx-evm:~# uname -a
    Linux am57xx-evm 4.4.41-gf9f6f0db2d #1 SMP PREEMPT Tue Jul 25 09:45:11 EDT 2017 armv7l GNU/Linux

    root@am57xx-evm:~# cat /sys/class/dma/dma0chan0/in_use
    1

    root@am57xx-evm:~# modprobe dmatest timeout=2000 iterations=1 run=1
    [ 148.876330] dmatest: Started 1 threads using dma0chan4
    [ 148.881853] dmatest: dma0chan4-copy0: summary 1 tests, 0 failures 177 iops 1242 KB/s (0)
    [ 148.891938] dmatest: Started 1 threads using dma0chan5
    [ 148.892271] dmatest: dma0chan5-copy0: summary 1 tests, 0 failures 3367 iops 13468 KB/s (0)
    (more logs omitted)

    Please verify if this solved your issue. Thanks!

    Rex
  • yes, it's working now.

    I used below command

    insmod dmatest.ko                       
    echo dma0chan4 > /sys/module/dmatest/parameters/channel       
    echo 2000 > /sys/module/dmatest/parameters/timeout                 
    echo 1 > /sys/module/dmatest/parameters/iterations              
    echo 1 > /sys/module/dmatest/parameters/verbose                 
    echo 1 > /sys/module/dmatest/parameters/run  
    thanks for your effort!