public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sinan Kaya <okaya@codeaurora.org>
To: Dan Williams <dan.j.williams@intel.com>,
	Vinod Koul <vinod.koul@intel.com>
Cc: "dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
	timur@codeaurora.org, cov@codeaurora.org, jcm@redhat.com,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V2 2/3] dmaselftest: add memcpy selftest support functions
Date: Tue, 3 Nov 2015 10:51:55 -0500	[thread overview]
Message-ID: <5638D81B.2010303@codeaurora.org> (raw)
In-Reply-To: <CAPcyv4gDy17WuV_f=t77v_Gw+6vihkHXpE8TRBjgnkvjZPgYEA@mail.gmail.com>



On 11/3/2015 2:44 AM, Dan Williams wrote:
> On Mon, Nov 2, 2015 at 10:30 PM, Vinod Koul <vinod.koul@intel.com> wrote:
>> On Mon, Nov 02, 2015 at 11:18:37PM -0500, Sinan Kaya wrote:
>>>
>>>
>>> On 11/2/2015 11:15 PM, Vinod Koul wrote:
>>>> On Mon, Nov 02, 2015 at 01:07:38AM -0500, Sinan Kaya wrote:
>>>>> This patch adds supporting utility functions
>>>>> for selftest. The intention is to share the self
>>>>> test code between different drivers.
>>>>>
>>>>> Supported test cases include:
>>>>> 1. dma_map_single
>>>>> 2. streaming DMA
>>>>> 3. coherent DMA
>>>>> 4. scatter-gather DMA
>>>>
>>>> This seems quite similar to dmatest, any reason why you cannot use/enhance
>>>> that?
>>>>
>>> Dmatest is a standalone kernel module intended for stress testing
>>> DMA engines from userspace with N number of threads and M size
>>> combinations etc.
>>>
>>> This one; on the other hand, is selftest to verify hardware is
>>> working as expected during power up.
>>>
>>> Almost all DMA engine drivers come with some sort of selftest code
>>> called from probe. I followed the same design pattern.
>>
>> which ones ?
>>
>>>


>>> I think the goal is to remove the duplicate self test code in all
>>> drivers over time.
>>
>> and what prevents us from having common selftest plus dmatest code. Most of
>> the code here to do selftest is _same_ dmaengine routine code used in
>> dmatest
>>
>> We can have common code which is used for dmatest as well as selftest. I do
>> not want to see same code duplicated..
>
> Originally ioatdma and iop-adma had local self tests before Haavard
> created dmatest.  I agree having the drivers also do a test each boot
> is redundant, but then again dmatest is not automatic and I saw the
> local self test catch an interrupt setup regression.

I see the following files still have some sort of self test code in them.

ioat\dma.c
ioat\dma_v2.c
ioat\dma_v3.c
iop-adma.c
mv_xor.c


>
> Maybe you could arrange for drivers to do a quick autorun through
> dmatest on load if dmatest is enabled, but otherwise load without
> testing?  Just my 2 cents from a dmaengine spectator.
>

I'm on the same boat. Almost all kernel configurations that I have seen 
do not have dmatest enabled. Dmatest is considered debug only and is not 
included into the kernel binaries.

I have no problem for moving the code from one location to the other but 
I still want to be able to run self-test code in mission mode before 
enabling DMA as today.

I'm open to suggestions.

-- 
Sinan Kaya
Qualcomm Technologies, Inc. on behalf of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a 
Linux Foundation Collaborative Project

  parent reply	other threads:[~2015-11-03 15:52 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1446444460-21600-1-git-send-email-okaya@codeaurora.org>
2015-11-02  6:07 ` [PATCH V2 1/3] dma: add Qualcomm Technologies HIDMA management driver Sinan Kaya
2015-11-02 15:57   ` Rob Herring
2015-11-02 16:20     ` Sinan Kaya
2015-11-02 17:26       ` Timur Tabi
2015-11-02 17:42         ` Rob Herring
2015-11-02 17:48           ` Timur Tabi
2015-11-02 18:25             ` Rob Herring
2015-11-02 18:30               ` Timur Tabi
2015-11-05 14:31                 ` Rob Herring
2015-11-05 14:43                   ` Timur Tabi
2015-11-02 18:49           ` Sinan Kaya
2015-11-02 22:00             ` Arnd Bergmann
2015-11-03  5:18     ` Sinan Kaya
2015-11-03 10:22   ` Andy Shevchenko
2015-11-04  0:47     ` Sinan Kaya
2015-11-02  6:07 ` [PATCH V2 2/3] dmaselftest: add memcpy selftest support functions Sinan Kaya
2015-11-03  4:15   ` Vinod Koul
2015-11-03  4:18     ` Sinan Kaya
2015-11-03  6:30       ` Vinod Koul
2015-11-03  7:44         ` Dan Williams
2015-11-03  8:22           ` Andy Shevchenko
2015-11-03 16:08             ` Vinod Koul
2015-11-05  2:42               ` Sinan Kaya
2015-11-05 12:05                 ` Vinod Koul
2015-11-05 16:17                   ` Sinan Kaya
2015-11-07  6:23                     ` Sinan Kaya
2015-11-08 13:53                       ` Vinod Koul
2015-11-13 20:20                         ` okaya
2015-11-03 15:51           ` Sinan Kaya [this message]
2015-11-03 16:06           ` Vinod Koul
2015-11-03 14:31       ` Timur Tabi
2015-11-03 16:10         ` Vinod Koul
2015-11-03 16:28           ` Sinan Kaya
2015-11-03 16:46             ` Timur Tabi
2015-11-03 16:57               ` Sinan Kaya
2015-11-03 16:48           ` Timur Tabi
2015-11-02  6:07 ` [PATCH V2 3/3] dma: add Qualcomm Technologies HIDMA channel driver Sinan Kaya
2015-11-03 10:10   ` Andy Shevchenko
2015-11-04  0:07     ` Sinan Kaya
2015-11-04 17:44       ` Andy Shevchenko
2015-11-05  2:22         ` Sinan Kaya

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5638D81B.2010303@codeaurora.org \
    --to=okaya@codeaurora.org \
    --cc=cov@codeaurora.org \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=jcm@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=timur@codeaurora.org \
    --cc=vinod.koul@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox