All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"arnd@arndb.de" <arnd@arndb.de>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"sergei.shtylyov@cogentembedded.com" 
	<sergei.shtylyov@cogentembedded.com>,
	"bgolaszewski@baylibre.com" <bgolaszewski@baylibre.com>,
	"mika.westerberg@linux.intel.com"
	<mika.westerberg@linux.intel.com>,
	"efremov@linux.com" <efremov@linux.com>,
	"ztuowen@gmail.com" <ztuowen@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH v2] devres: keep both device name and resource name in pretty name
Date: Mon, 1 Jun 2020 13:39:46 +0300	[thread overview]
Message-ID: <CAHp75Vfg20sTa2qCQkA5g5uFzGtm7rGc9MuqpC4CSjU-4y0V9g@mail.gmail.com> (raw)
In-Reply-To: <CA+h21ho-XYzWo8BqHwu9REnBVEgG2Zynuux=j_UJ8hvhXATOVA@mail.gmail.com>

On Mon, Jun 1, 2020 at 12:13 AM Vladimir Oltean <olteanv@gmail.com> wrote:
> On Mon, 1 Jun 2020 at 00:05, Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> > On Sunday, May 31, 2020, Vladimir Oltean <olteanv@gmail.com> wrote:

> >> 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

> > All of this seems an ABI change.

> Yes, indeed. What should I understand from your comment though?

You effectively break an ABI.

-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2020-06-01 10:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-31 18:07 [PATCH v2] devres: keep both device name and resource name in pretty name Vladimir Oltean
     [not found] ` <CAHp75Vc5NrDUZwv7uW+P=Ly+tz3a9XgEukX6ZgSccj_1sMYQaw@mail.gmail.com>
2020-05-31 21:13   ` Vladimir Oltean
2020-06-01 10:39     ` Andy Shevchenko [this message]
2020-06-01 10:43       ` Vladimir Oltean
2020-06-01  7:51 ` Sergei Shtylyov
2020-06-01  9:36   ` Vladimir Oltean
2020-06-01  9:48     ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHp75Vfg20sTa2qCQkA5g5uFzGtm7rGc9MuqpC4CSjU-4y0V9g@mail.gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=bgolaszewski@baylibre.com \
    --cc=efremov@linux.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=sergei.shtylyov@cogentembedded.com \
    --cc=ztuowen@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.