Received: by 10.213.65.68 with SMTP id h4csp1090705imn; Wed, 4 Apr 2018 12:25:20 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+kBNq549aNEobCLrZuZq4TCB1kjodhtHcHEnb0czVxTXxpJEzWfxJpLa4T0yleU1xYpIS5 X-Received: by 2002:a17:902:3e5:: with SMTP id d92-v6mr20269965pld.104.1522869919954; Wed, 04 Apr 2018 12:25:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522869919; cv=none; d=google.com; s=arc-20160816; b=oSlJ3KgU7q3u9lVy0veV2FG8bPIkXJbV1bPsNMyVo9wlElk0iB6WAXX1UDZ/lU0AXU Q8RJuaIn9pef+BYbD+QGTvgikS560eWB/6gk24+vZkapwgGuBhVWyeogoCEYKyULBJ1u D4lz8UQTAL4xYu8Ro5nW53jRQofZ3kvJyQhu5J2WQGwblOS4TjSIy3Av/ldRlZuP38MC B3Ps44kYw8tnQ34dNqTE+eZdhkhHQjoPceGj/VyNcdqSLLpQ8OV+9Pe5DF53TkShvEPb JNE3VY+S+ufRCuEAbDFlLN4cQbenFF1n0ztFX0Ft6tsG27cwR1tg1gu26m4PFEe1lTlx GETw== 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=6yMg9noNJ3Wt8fo5GzWcWIBSCZINjcNDxxzPhy0gHS0=; b=fj+PXlff+tJsNpm8ZLMamS/STDBwMGga642yylvDuqPtwOppcepf8rs5r9zE7eu23X djCFQ4ihlbHENhil/mft7vGIWKsvf7PeipD8MdR1WdYlKS2VASV8998a5FmjCaLxGk2i d2amFWU6j6B3NNVPxBuGx2UJk2KjW+aEpUeGne6pvtpVsjDiYgWk8fwHqgQUPdsD9h7L /D0LjehZcCPN7R1JyW37BtgaGw9kGLeNduK+eBAyn70veFgtaajgRjEuhHoa9qFKtzE0 OkY3ksrHwzaVAyAoY4cF0VNp4DIoS/QxMH2mD9FKDAH4g9I158W/fBVHRQ2hQpA4d5on sPJw== 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 f187si4089464pgc.459.2018.04.04.12.25.05; Wed, 04 Apr 2018 12:25:19 -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 S1752257AbeDDTW1 (ORCPT + 99 others); Wed, 4 Apr 2018 15:22:27 -0400 Received: from smtp05.smtpout.orange.fr ([80.12.242.127]:29942 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752318AbeDDTWH (ORCPT ); Wed, 4 Apr 2018 15:22:07 -0400 Received: from belgarion ([86.201.130.131]) by mwinf5d62 with ME id WKMw1x0072qEl8e03KMwcm; Wed, 04 Apr 2018 21:22:04 +0200 X-ME-Helo: belgarion X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Wed, 04 Apr 2018 21:22:04 +0200 X-ME-IP: 86.201.130.131 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> <87h8os3uwa.fsf@belgarion.home> X-URL: http://belgarath.falguerolles.org/ Date: Wed, 04 Apr 2018 21:21:55 +0200 In-Reply-To: (Arnd Bergmann's message of "Wed, 4 Apr 2018 12:18:58 +0200") Message-ID: <87d0ze4w18.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 Arnd Bergmann writes: > On Tue, Apr 3, 2018 at 10:19 PM, Robert Jarzmik wrote: >> ... chop chop removing unneeded recipients .... >> >> Arnd Bergmann writes: >>> 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 > > Right, but it could just always use a static priority, right? Yes, an implicit default priority. I'm not a big fan of implicit parameters, yet I can do it. >> - 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. > > Can't you just reset those in pxad_free_chan_resources()? I can, let's see what happens next ... Cheers. -- Robert