Received: by 10.213.65.68 with SMTP id h4csp3934454imn; Tue, 3 Apr 2018 13:21:06 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+kiVj3oRbi1Vh4hzlHY7NLnnkm2RWv3V0sD622iS1JXJSdwys+TlOSZAvPYtrtjXepviJN X-Received: by 2002:a17:902:a608:: with SMTP id u8-v6mr15752884plq.25.1522786866354; Tue, 03 Apr 2018 13:21:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522786866; cv=none; d=google.com; s=arc-20160816; b=kscqvO0WrQEkhocKdxgzBIM0gAIsl5U989BvyVMo0gajvR4JaiF/TCOAbbFCSV260R ZuwTQiIA24EkNw14CPLf4AKrlPxWiOIlwhrgAprXFejdBKO55T5K2ywRhBmcBxEdUigE I7An5M9i3dtTue6QzJMxISIbCBO4Ur6jnkd+qOPKQjvcmPx35Q9VTslglUHcdj+u+8ue 7axYZz5tUn+0xGiCsea+uv8Nc97syv2WAZEX6xqw7KATS71LBeg5+n4yveVMGx5ppeGD QL8NYTX0sZgmsiShufQeJMJCE84oe7fBMEp9leaerCIt8pYoCiVavzF/VlgzGGWIOuRm kMuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from :arc-authentication-results; bh=uVzYWMAMRkz1zi+EI9p4ax9UmWnnFg5Xp3p78Oa01QE=; b=sz4U6Rtk0i6FwvnwEtvXFPqeEIr/e/IfH7MfoiMFK0UQP01QQD7yIkbbiVDhLdjYgN PBPqtjbXng9wQJQMsWftL2NXyKWk5KMIIoAIN3m/A8NqUOynj/BPPIhrmPfKYsGOKPBf VwL4puxljLXTiCWyj2uUFrBpklmWzRSqSfo87sa5I2amBjNRT4A+OsH5jdc7q7i2l+q/ OyT2xfMG7wE0aKC7kYmbZUxcpJN+X1+OMErOKHUxJk80bpaIJ2TPLM4h4Jt0XZgsHEWp 4RQP1D9a1bDw3d5u9eK1kmyWRWfIvGtz1rnfAYlmR0+HtBbYDSSVfMbDhfs12GSZ6vbU 6/BQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d14-v6si1301465pls.723.2018.04.03.13.20.50; Tue, 03 Apr 2018 13:21:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752813AbeDCUTo (ORCPT + 99 others); Tue, 3 Apr 2018 16:19:44 -0400 Received: from smtp02.smtpout.orange.fr ([80.12.242.124]:38278 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751179AbeDCUTn (ORCPT ); Tue, 3 Apr 2018 16:19:43 -0400 Received: from belgarion ([37.171.40.252]) by mwinf5d25 with ME id VwKZ1x00K5SRlU503wKZtY; Tue, 03 Apr 2018 22:19:41 +0200 X-ME-Helo: belgarion X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Tue, 03 Apr 2018 22:19:41 +0200 X-ME-IP: 37.171.40.252 From: Robert Jarzmik To: Arnd Bergmann Cc: Daniel Mack , Haojian Zhuang , Vinod Koul , Linux ARM , Linux Kernel Mailing List , dmaengine@vger.kernel.org Subject: Re: [PATCH 02/15] ARM: pxa: add dma slave map References: <20180402142656.26815-1-robert.jarzmik@free.fr> <20180402142656.26815-3-robert.jarzmik@free.fr> <87tvss48ti.fsf@belgarion.home> X-URL: http://belgarath.falguerolles.org/ Date: Tue, 03 Apr 2018 22:19:33 +0200 In-Reply-To: (Arnd Bergmann's message of "Tue, 3 Apr 2018 17:39:08 +0200") Message-ID: <87h8os3uwa.fsf@belgarion.home> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ... chop chop removing unneeded recipients .... Arnd Bergmann writes: > Ok, I looked at the driver in more detail now and found the scary parts. > So it's using the async DMA interface to do synchronous DMA in > interrupt context in order to transfer the rx data faster than an readsl() > would, correct? That's correct, at least for the smc91x. > It still feels odd to me that there is an entry in the slave map for > a device that does not have a request line. However, it also seems > that the entire code in those two drivers that deals with DMA is specific > to PXA anyway, so maybe it can be done differently: instead of > calling dma_request_slave_channel_compat() or dma_request_chan() > with a fake request line, how about calling dma_request_channel() > with an NULL filter function and data, and have the driver handle > the empty data case the same way as the rq=-1 case today? Okay, in this case : - the channel priority cannot be passed anymore - and I don't see how this can work : dma_request_channel() __dma_request_channel() find_candidate() private_candidate(mask, device, fn, fn_param); /* Here, fn == NULL and fn_param == NULL as per your proposal */ This function will find the first available dma channel, all right, but no function will be called in pxa_dma driver, and therefore the last requestor of the channel will be used, which is bad. >> If you think it's worth it, what is the driving benefit behind ? > It seems a bit cleaner to only register the tables for the dma lines that > are actually present on a given chip. Okay, let's do this. Cheers. -- Robert