Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162164AbbKEQRz (ORCPT ); Thu, 5 Nov 2015 11:17:55 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:51281 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162139AbbKEQRx (ORCPT ); Thu, 5 Nov 2015 11:17:53 -0500 Subject: Re: [PATCH V2 2/3] dmaselftest: add memcpy selftest support functions To: Vinod Koul References: <1446444460-21600-1-git-send-email-okaya@codeaurora.org> <1446444460-21600-3-git-send-email-okaya@codeaurora.org> <20151103041528.GS21326@localhost> <5638359D.9080507@codeaurora.org> <20151103063009.GT21326@localhost> <20151103160800.GD12910@localhost> <563AC226.30303@codeaurora.org> <20151105120527.GX12910@localhost> Cc: Andy Shevchenko , Dan Williams , "dmaengine@vger.kernel.org" , timur@codeaurora.org, cov@codeaurora.org, jcm@redhat.com, "linux-kernel@vger.kernel.org" From: Sinan Kaya Message-ID: <563B812E.5090202@codeaurora.org> Date: Thu, 5 Nov 2015 11:17:50 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151105120527.GX12910@localhost> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2783 Lines: 73 On 11/5/2015 7:05 AM, Vinod Koul wrote: > On Wed, Nov 04, 2015 at 09:42:46PM -0500, Sinan Kaya wrote: >> Here is what I proposed. >> >> - a common file that gets compiled into a module that wants to use >> self-test with a public API. It can be called from driver's probe >> routine. >> - the test is independent of my implementation. It uses dmaengine >> API and should be portable to most drivers. >> - there *are* still drivers in the kernel that has selftest code >> embedded inside them. I followed the design pattern from other >> drivers thinking this must have been a good idea and it paid off for >> me. >> >> As far as I understand, there is interest in doing more than this >> and reusing the dmatest code for code duplication. > > the code that selftest uses to test will be very similar to dmatest code, > both of these _should_ share this common code so that fixes get done for > both! > OK, I can move the code around and try to combine it if possible. >> Facts: >> - Dmatest can be actually configured to run during boot. >> - Nobody besides the dma driver developer uses dmatest. This leaves >> holes for regressions that are really hard to debug due to >> interaction with the rest of the system. >> - Dmatest doesn't exist in most distribution kernels. > > That doesn't mean it is not useful. This line of thought is not quite right. > You are trying to say dmatest in not important and selftest is. Sorry but > you are wrong, both are equally important and since both try to test and use > similar routines (dmaengien API) they need to share the code and not > duplicate it > >> If we want to do something else, I need clear directions. I can >> remove the self test code completely from my driver. But, I need an >> equivalent functionality. > > Add selftest to dmatest, we need both! > OK, do you have any objections to compiling dmatest along with hidma in the same module and calling a function from there ? or do you have something else in your mind ? >> >>> >>> That part is tricky, you need to do so thru clients, spi/audio/serial etc >>> >> >> My selftest code actually attaches to all slave devices and issues a >> memcpy command and then detaches from the slave devices. > > Not everyone supports memcpy! > Right, last time I checked; you can request a DMA channel that supports MEMCPY specifically. -- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/