Received: by 10.213.65.68 with SMTP id h4csp556305imn; Wed, 4 Apr 2018 03:20:44 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+XbanfO1V866zlpVt20TfF7oJSTpe1F8l6oeEhaCY8h3ydzxJzAwL09mADWIU4xj0P0oso X-Received: by 10.99.170.9 with SMTP id e9mr11503150pgf.331.1522837244164; Wed, 04 Apr 2018 03:20:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522837244; cv=none; d=google.com; s=arc-20160816; b=rCrZM4opG4CzvjGFunxY7pYRfsJThI06pNC0RxCk/kL4iVMENtWKjpjRVZ6onA2Nc9 8Wf1YIQSGHgAvU8Mse0GWriL+jsbYT+McK2txkjHeYbaRjdZqzlPpkM2qY4XMNv3gf3k i2jMs83wbF52gVBlhgimueqINSMLHQSe9lVm3d30P9i4PV6nU+tjiwcM28YvRPqvWKL1 K0tuFYYEQvkBYH65qCLE7JSEk1NtWlkwxjKlcEWpKGuqeS8GglRNsnml1xFoDeAlchwa StCZ2VVmPIXhOUtR0ggIF8nT2EtMMZbn8ABYrMWBRgB9ruxHc/imc4XLLL00VBJHUD6O avoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=FtI0uBPzqO9SZrDyX57xRINQWM2c1j6glRlr6kLR7OI=; b=eRVsPrgNfBlSuE5yvaNdbKgSt5BFgUuNKbH5BJwsrM/413aYg5e6ciXS5nkMtrC3Jq X1u54GyKyRg2uuZd1WutKXh6CUZjffdGFfzIbU6mtWfsQ3Y2thfi7kLgfde5/BujVO/a zLsGz+pSsZr273qWbI7ECzXhGpaAtC7jP3XSNZRh21gvi/MZH4JbUiqBwIkavj+Hz07E VDYZFt7PSfhXrK9iDBgO1wlTWrjW3jNG8B9Uxb7eMYYbX+x1i5BcVpjFBzBnot1HooKm vVYrfBn5D+8X0FjyPUYG/1UERxFO4bzyRKhgrNV1RY5zCjIAIBNxikWF1g4vsDRL4N18 c/fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=fPMr3Bhp; 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 202si3584315pgb.408.2018.04.04.03.20.29; Wed, 04 Apr 2018 03:20:44 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=fPMr3Bhp; 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 S1751326AbeDDKTB (ORCPT + 99 others); Wed, 4 Apr 2018 06:19:01 -0400 Received: from mail-qt0-f170.google.com ([209.85.216.170]:45420 "EHLO mail-qt0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750762AbeDDKS7 (ORCPT ); Wed, 4 Apr 2018 06:18:59 -0400 Received: by mail-qt0-f170.google.com with SMTP id f8so22478365qtg.12; Wed, 04 Apr 2018 03:18:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=FtI0uBPzqO9SZrDyX57xRINQWM2c1j6glRlr6kLR7OI=; b=fPMr3BhpJcZ6VYAn0eO4+qFKQR3S11icp3fYgS3MdQt5Al6WLXxnkT7WHygioyJIzp 65JjvZQlTXrlRPtqJJ5Eng+OBjYhqhW/MUMaqUv+fmpxEVxdYwn3eplYOtFYnODWLHEa 5GSeq8m+lJ5fLjqVQpQNk4tt3HvER9glFbYbQtuv9lwNM+wEIRUaGF77bjSONoY1z/OU HIZc4KoXnmUj3ZsEbdIPj7wIeGThZ3HJyyx6lDA4uc/hVcZKtpEI39Df0z3GBHUF9Rs5 9Qg+CzLvFv5LG8tp2qEsyzm/YD+CC7q6HmrQDtL9R1vi9MZ2WJCMFU/01oSIgnGAsEih 0g1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=FtI0uBPzqO9SZrDyX57xRINQWM2c1j6glRlr6kLR7OI=; b=VIK4HQWj0OTfu5vkzJ6dtm+Kz4ll21QBk22pXzDPY4ZCl1WRLEEFtSet6xK7txMXaC X+KS3sdPe0kmiRsq1VV1d9Jxp/M66eqseCI8GTwY/gU57uASCBVegNVdmS6bsNEWnWog TGzcm83nWprWl/gQgmfRmbSm1JvnOEHuYngQeFwMXsTsEsFJGuwTaD/l8ZeZ8S8r9JmX fxKYIcNCC+qwBl/SIDlO4lY3ahq3OR8jda2B1m9XYRjkRiowfW2CZgP5zxdFlvIuAgdd GliNxsbwUcsq7Rv/XfMKvSYirjEmroWIMzq4SdCgNLOb3LtfU+HAQrG6CvjcHsRieYKv g8Ag== X-Gm-Message-State: ALQs6tDWT9DOcXavsSS0voh9ldDBe9KYlAYjW4Thv+vnR7ZdI2xhnfC2 nw6UWhg/wAvaZCKfJZMBoX9/mm24kMkXRb2cbYQ= X-Received: by 10.200.47.26 with SMTP id j26mr25162592qta.185.1522837138931; Wed, 04 Apr 2018 03:18:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.185.25 with HTTP; Wed, 4 Apr 2018 03:18:58 -0700 (PDT) In-Reply-To: <87h8os3uwa.fsf@belgarion.home> References: <20180402142656.26815-1-robert.jarzmik@free.fr> <20180402142656.26815-3-robert.jarzmik@free.fr> <87tvss48ti.fsf@belgarion.home> <87h8os3uwa.fsf@belgarion.home> From: Arnd Bergmann Date: Wed, 4 Apr 2018 12:18:58 +0200 X-Google-Sender-Auth: -q4F-n0cowmTZLbpexKXzNW60hI Message-ID: Subject: Re: [PATCH 02/15] ARM: pxa: add dma slave map To: Robert Jarzmik Cc: Daniel Mack , Haojian Zhuang , Vinod Koul , Linux ARM , Linux Kernel Mailing List , dmaengine@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 3, 2018 at 10:19 PM, Robert Jarzmik wrote: > ... 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 Right, but it could just always use a static priority, right? > - 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()? Arnd