Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2432313ybl; Mon, 20 Jan 2020 02:53:28 -0800 (PST) X-Google-Smtp-Source: APXvYqzQL7CzrwK02RicKL3jmqEbv/FIBl5ubfVfOT+h0QdLThlWPpB5IU6JH9mKvqqFcOtzax4m X-Received: by 2002:a05:6830:4d9:: with SMTP id s25mr15584904otd.171.1579517608235; Mon, 20 Jan 2020 02:53:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579517608; cv=none; d=google.com; s=arc-20160816; b=dNILhclnpMfR6bdaUdCujJNWLgglID9uXAE849S2Kz+Y1r49VnDYX5gqKzvBu33ad5 4lYIyml0unN5EOATbi2AlqawH4QvZBtcaqlzDtgNtos/lRf7AQYPVwfaUpx2GQa750Rk Tqtk5lebL0akZiUhysGu6Vir2JbdksguQRwnLkRDnTzz2w5DrsLWCHRvSQ+WTGBhIHjg Dhaoo+GY7dWo1vKOLNf3n5fuJ6qrqh7Cy/7gGgEu7dsoRXgp5HXqK3vLnf1HJ8K+QdBj OL8PDGkapzJRwPAi4KMCSQ0oU1GSQgYbxfF17QDIVqrXlQT14OW5jGOeQSQDbNa8MsvM 4e9A== 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 :in-reply-to:references:mime-version; bh=uvHX7RkeGS1j3292t6lYP6xOMynSovwccmbxVM2lgsw=; b=YRhZ27616aLHdAOkC36y6r43QqopTXFm7KxwgivFHu1XiNv6jo9cLFcMZaSE8qLAR7 +9SYZgrgcsOXfoNx5vFBggfBrLEtQ+QuYTinRdrXld4nD0X+ag00zCPwfc9fR4h+xmUZ NBCfhzhltPcCpUsBpedYtmKtWf/awLKG0hM4QuwmA97Q+sSDPhK5bwR5P3nYKjSp1eUA eSsk7r8fVs3CLLE6rODjJYZRRtU1RJnIWzgRwe1cjoYFfgJ6CG6tho5WGKv7/gWoaalm 0JCrZjJ86VhwfziS2deEWGvmPl4UckqauglA2j+yPQuQrGZDeuLK+BSyTRCiiD+JxU8o 1cmQ== 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 c186si17443288oib.103.2020.01.20.02.53.16; Mon, 20 Jan 2020 02:53:28 -0800 (PST) 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 S1727032AbgATKvO (ORCPT + 99 others); Mon, 20 Jan 2020 05:51:14 -0500 Received: from mail-oi1-f194.google.com ([209.85.167.194]:45939 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726148AbgATKvN (ORCPT ); Mon, 20 Jan 2020 05:51:13 -0500 Received: by mail-oi1-f194.google.com with SMTP id n16so28120739oie.12; Mon, 20 Jan 2020 02:51:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uvHX7RkeGS1j3292t6lYP6xOMynSovwccmbxVM2lgsw=; b=YJJeXw6ae7qgYqMitzMkrRdQUq6678B5XnQgKb/ZREeHQabqsvViNGCVCe2Cd0CbpB vkUIlB+o+Ah+Vnrfrrakp/bsJodJD1YrNYwnReGQdoPXOdPPT5KiedYaLeMZuwx635Fn c/Q/oZBsRrSa6WL3Jho1o/gy4/zL/4x44ZX+xKDbLvzpbmtSmYK5lDK/Do3KHPJUPBaH yqZLHU63OMyjYkowR16M1/7Gcbwpv8AetwMJ0qJTKO31q/V9UIzkj/Z4d1FpOCs6Kr4s IcBa+txrrmu71Sd56llLT4wFOha9QSJ5LxFi7n68nPXGU/08d7XGgu/6HPpmO3BKM2xa 99HQ== X-Gm-Message-State: APjAAAWZnXldiqx7hro8oaOENIw2xL1oxzn+8D7uaheiPVjrbeIlKKKo F3iKCXXezOagHsj7RK3fHGyTX5gJ2YzE8+BMUeo= X-Received: by 2002:a05:6808:292:: with SMTP id z18mr11864654oic.131.1579517473071; Mon, 20 Jan 2020 02:51:13 -0800 (PST) MIME-Version: 1.0 References: <20200117153056.31363-1-geert+renesas@glider.be> <1cdc4f71-f365-8c9e-4634-408c59e6a3f9@ti.com> In-Reply-To: <1cdc4f71-f365-8c9e-4634-408c59e6a3f9@ti.com> From: Geert Uytterhoeven Date: Mon, 20 Jan 2020 11:51:01 +0100 Message-ID: Subject: Re: [PATCH v2] dmaengine: Create symlinks between DMA channels and slaves To: Peter Ujfalusi Cc: Vinod Koul , Dan Williams , dmaengine@vger.kernel.org, Linux-Renesas , Linux Kernel Mailing List 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 Hi Peter, On Mon, Jan 20, 2020 at 11:16 AM Peter Ujfalusi wrote: > On 20/01/2020 11.01, Geert Uytterhoeven wrote: > > On Fri, Jan 17, 2020 at 9:08 PM Peter Ujfalusi wrote: > >> On 1/17/20 5:30 PM, Geert Uytterhoeven wrote: > >>> Currently it is not easy to find out which DMA channels are in use, and > >>> which slave devices are using which channels. > >>> > >>> Fix this by creating two symlinks between the DMA channel and the actual > >>> slave device when a channel is requested: > >>> 1. A "slave" symlink from DMA channel to slave device, > >> > >> Have you considered similar link name as on the slave device: > >> slave: > >> > >> That way it would be easier to grasp which channel is used for what > >> purpose by only looking under /sys/class/dma/ and no need to check the > >> slave device. > > > > Would this really provide more information? > > The device name is already provided in the target of the symlink: > > > > root@koelsch:~# readlink > > /sys/devices/platform/soc/e6720000.dma-controller/dma/dma1chan2/slave > > ../../../ee140000.sd > > e6720000.dma-controller/dma/dma1chan2/slave -> ../../../ee140000.sd > e6720000.dma-controller/dma/dma1chan3/slave -> ../../../ee140000.sd > > It is hard to tell which one is the tx and RX channel without looking > under the ee140000.sd: > > ee140000.sd/dma:rx -> ../e6720000.dma-controller/dma/dma1chan3 > ee140000.sd/dma:tx -> ../e6720000.dma-controller/dma/dma1chan2 Oh, you meant the name of the channel, not the name of the device. My mistake. As this name is a property of the slave device, not of the DMA channel, I don't think it belongs under dma*chan*. > Another option would be to not have symlinks, but a debugfs file where > this information can be extracted and would only compiled if debugfs is > enabled. Like /proc/interrupts? That brings the complexity of traversing all channels etc. What do other people think? Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds