Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp282012ybg; Mon, 1 Jun 2020 00:53:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyG/kY6TMy+Q5V+ogxCOOhxV62DsYZpa0sr8EuGt53MrZ4AImTJG9zHZKxK2yDy2oQfc8Sz X-Received: by 2002:aa7:c71a:: with SMTP id i26mr7895929edq.149.1590998011600; Mon, 01 Jun 2020 00:53:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590998011; cv=none; d=google.com; s=arc-20160816; b=cORHOEDiC/VelF6u8XTT6oFvRFHcstT2F3SighJdxA8KbrANt4sMa0c+APn3d0i4Td Exa2C//Ts3yuAwcBn45rO5I4/yBSCHknIvVODmvPUtr4tbyP2wlfwvoqSrAnDFLPq0Xe 70PQ6t9WvkNRULEMclj/DwyvQmZOQkTvqNAjXualoTVXSWWFFLDHEVsoj+Bo/s2NmkM7 XtV77K4p550vtjq2JEcBoaV77a+bU7Z3TpKDzR1zOW5xIYncAsAx+uKZCGUeeI12snHZ aAJbAKEYMhi8LtWv5UTsSojVFoojPG2ElXBBzxIxdNWZ88MwX0SbV4HGsXsXTkNcvpJ4 P0yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=lLnsFSRkW5PHb+/oaZ7Mx9bMV/UsiXKKVLVFncEiU3E=; b=pWtPPVPG91CFlMf86vcK+ZuPPTfV7VMEN5p5JWlXtnwRf5xoSLTfXyuzF07YfbJCsa UcC/uCJLgPSSPdwMF0ASUg0yaH13SK0ct7ny9jf42F8RlGQTjfuCt9r9q4YDzoMy4UqB P12xce323iirLUlZJgmqXbvEfhWOfGCannWWxNjrDjE6epUwPDFRApuCvfKsnJOvbpKQ 3PnAp6ZYSP9Kk2aQcRo0C8UKGYMfa19jOfWFn7dPp0crpP8dQFtZtTCMXZVGq/C0A0rC 3ptnEhzbDrDsUlosONRztlCOFr4ITFtcocCeDDNnHJGQFwE4h58WK6k0UtvaJe/YgwZ6 ngEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cogentembedded-com.20150623.gappssmtp.com header.s=20150623 header.b=1bqiI0ST; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m10si10151466edv.322.2020.06.01.00.53.08; Mon, 01 Jun 2020 00:53:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cogentembedded-com.20150623.gappssmtp.com header.s=20150623 header.b=1bqiI0ST; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726265AbgFAHvV (ORCPT + 99 others); Mon, 1 Jun 2020 03:51:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725935AbgFAHvV (ORCPT ); Mon, 1 Jun 2020 03:51:21 -0400 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB06CC061A0E for ; Mon, 1 Jun 2020 00:51:20 -0700 (PDT) Received: by mail-lf1-x142.google.com with SMTP id e125so3398918lfd.1 for ; Mon, 01 Jun 2020 00:51:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=lLnsFSRkW5PHb+/oaZ7Mx9bMV/UsiXKKVLVFncEiU3E=; b=1bqiI0STU9hw+Veqkv1PIzwq1jo5n3EFM5FwycBBlBHQv9+wYSjymGX/dXiiShRE7K 6HDjn+4Gsn5SB5km9/6neacSNl+4k4U+dXsddiqIb1d6pqo3TwpvTTje1MUCd30Rig6n 0OkLjQNOGHAWNCRRmHFT27mYd31OqSC2M4VkQoO3KOxOJRmn0DVC4w5AxyvgmGQ2WjDT AX/weecLtERefoRVsjMHBjNn3EYEKEBZNseKuY/gzpV4Tynooat7E6reh212c79jiHBT pKeSqXQV5SzB9Ui2CEcg75WUobA1/gVLQdYRQjoLxV7QyenjdXm5QML26ykWybMZ0Sh3 p5Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=lLnsFSRkW5PHb+/oaZ7Mx9bMV/UsiXKKVLVFncEiU3E=; b=MjA/Gmde0BJc5Vi8FCskp4JUKmb6drNxWDOFdWpzStOvRfOpWeBZxOebUZZq4WE035 fsAqA8UOI6W0E8T2y562gjQgTmfmvUsUFfDxd7Fka2cvZFBPZMQFEDd6U9+WhEQMT6/9 Mg8/laUTBGVXv9fIpvnyvkLIg5cul/FBxUibEU1TR4bnYCQ5BPGMyRZnbc+OoipuGAHm n6Y7vBkfxi78Hg3+5GPWu1J9Fy+8o5axkEkrbP61bC51lazBwyG/z+hGkW7aKIKtUKsH 0vAiz82AIo+ZPlC++v0KZN8t4IgSEzZVMtynfsEn/HDDwtzNuXwtcv2ai0kwRkXVeua7 JO1Q== X-Gm-Message-State: AOAM533E3Iwkhf2crExzQ6FmQLQkkLjAkEELao9cLXoiKWwdPLsfLRU9 ftvxUe087aGq7vHSJ3pnhgGZsQ== X-Received: by 2002:ac2:5cac:: with SMTP id e12mr10743762lfq.92.1590997879369; Mon, 01 Jun 2020 00:51:19 -0700 (PDT) Received: from ?IPv6:2a00:1fa0:2dd:a862:f067:6dfa:d209:15e? ([2a00:1fa0:2dd:a862:f067:6dfa:d209:15e]) by smtp.gmail.com with ESMTPSA id 10sm2361654ljw.134.2020.06.01.00.51.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 01 Jun 2020 00:51:18 -0700 (PDT) Subject: Re: [PATCH v2] devres: keep both device name and resource name in pretty name To: Vladimir Oltean , gregkh@linuxfoundation.org, arnd@arndb.de, akpm@linux-foundation.org Cc: bgolaszewski@baylibre.com, mika.westerberg@linux.intel.com, efremov@linux.com, ztuowen@gmail.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org References: <20200531180758.1426455-1-olteanv@gmail.com> From: Sergei Shtylyov Message-ID: <39107d25-f6e6-6670-0df6-8ae6421e7f9a@cogentembedded.com> Date: Mon, 1 Jun 2020 10:51:14 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 In-Reply-To: <20200531180758.1426455-1-olteanv@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello! On 31.05.2020 21:07, Vladimir Oltean wrote: > From: Vladimir Oltean > > Sometimes debugging a device is easiest using devmem on its register > map, and that can be seen with /proc/iomem. But some device drivers have > many memory regions. Take for example a networking switch. Its memory > map used to look like this in /proc/iomem: > > 1fc000000-1fc3fffff : pcie@1f0000000 > 1fc000000-1fc3fffff : 0000:00:00.5 > 1fc010000-1fc01ffff : sys > 1fc030000-1fc03ffff : rew > 1fc060000-1fc0603ff : s2 > 1fc070000-1fc0701ff : devcpu_gcb > 1fc080000-1fc0800ff : qs > 1fc090000-1fc0900cb : ptp > 1fc100000-1fc10ffff : port0 > 1fc110000-1fc11ffff : port1 > 1fc120000-1fc12ffff : port2 > 1fc130000-1fc13ffff : port3 > 1fc140000-1fc14ffff : port4 > 1fc150000-1fc15ffff : port5 > 1fc200000-1fc21ffff : qsys > 1fc280000-1fc28ffff : ana > > But after the patch in Fixes: was applied, the information is now > presented in a much more opaque way: > > 1fc000000-1fc3fffff : pcie@1f0000000 > 1fc000000-1fc3fffff : 0000:00:00.5 > 1fc010000-1fc01ffff : 0000:00:00.5 > 1fc030000-1fc03ffff : 0000:00:00.5 > 1fc060000-1fc0603ff : 0000:00:00.5 > 1fc070000-1fc0701ff : 0000:00:00.5 > 1fc080000-1fc0800ff : 0000:00:00.5 > 1fc090000-1fc0900cb : 0000:00:00.5 > 1fc100000-1fc10ffff : 0000:00:00.5 > 1fc110000-1fc11ffff : 0000:00:00.5 > 1fc120000-1fc12ffff : 0000:00:00.5 > 1fc130000-1fc13ffff : 0000:00:00.5 > 1fc140000-1fc14ffff : 0000:00:00.5 > 1fc150000-1fc15ffff : 0000:00:00.5 > 1fc200000-1fc21ffff : 0000:00:00.5 > 1fc280000-1fc28ffff : 0000:00:00.5 > > That patch made a fair comment that /proc/iomem might be confusing when > it shows resources without an associated device, but we can do better > than just hide the resource name altogether. Namely, we can print the > device name _and_ the resource name. Like this: > > 1fc000000-1fc3fffff : pcie@1f0000000 > 1fc000000-1fc3fffff : 0000:00:00.5 > 1fc010000-1fc01ffff : 0000:00:00.5 sys > 1fc030000-1fc03ffff : 0000:00:00.5 rew > 1fc060000-1fc0603ff : 0000:00:00.5 s2 > 1fc070000-1fc0701ff : 0000:00:00.5 devcpu_gcb > 1fc080000-1fc0800ff : 0000:00:00.5 qs > 1fc090000-1fc0900cb : 0000:00:00.5 ptp > 1fc100000-1fc10ffff : 0000:00:00.5 port0 > 1fc110000-1fc11ffff : 0000:00:00.5 port1 > 1fc120000-1fc12ffff : 0000:00:00.5 port2 > 1fc130000-1fc13ffff : 0000:00:00.5 port3 > 1fc140000-1fc14ffff : 0000:00:00.5 port4 > 1fc150000-1fc15ffff : 0000:00:00.5 port5 > 1fc200000-1fc21ffff : 0000:00:00.5 qsys > 1fc280000-1fc28ffff : 0000:00:00.5 ana > > Fixes: 8d84b18f5678 ("devres: always use dev_name() in devm_ioremap_resource()") > Signed-off-by: Vladimir Oltean [...] You didn't write the version log -- what changed since v1? MBR, Sergei