From: Andrew Lunn <andrew@lunn.ch>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Pavel Machek" <pavel@ucw.cz>, "Marek Behún" <kabel@kernel.org>,
"linux-leds@vger.kernel.org" <linux-leds@vger.kernel.org>,
netdev@vger.kernel.org,
"Jacek Anaszewski" <jacek.anaszewski@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: are device names part of sysfs ABI? (was Re: devicename part of LEDs under ethernet MAC / PHY)
Date: Mon, 4 Oct 2021 14:14:05 +0200 [thread overview]
Message-ID: <YVrwDbZYqs05d1wu@lunn.ch> (raw)
In-Reply-To: <YVq7oTTv5URYKVJb@kroah.com>
On Mon, Oct 04, 2021 at 10:30:25AM +0200, Greg Kroah-Hartman wrote:
> On Mon, Oct 04, 2021 at 09:38:41AM +0200, Pavel Machek wrote:
> > Hi!
> >
> > > > > > Are device names (as returned by dev_name() function) also part of
> > > > > > sysfs ABI? Should these names be stable across reboots / kernel
> > > > > > upgrades?
> > > > >
> > > > > Stable in what exact way?
> > > >
> > > > Example:
> > > > - Board has an ethernet PHYs that is described in DT, and therefore
> > > > has stable sysfs path (derived from DT path), something like
> > > > /sys/devices/.../mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:01
> > >
> > > None of the numbers there are "stable", right?
> >
> > At least f1072004 part is stable (and probably whole path). DT has
> > advantages here, and we should provide stable paths when we can.
>
> The kernel should enumerate the devices as best that it can, but it
> never has the requirement of always enumerating them in the same way
> each time as many busses are not deterministic.
And for this particular SoC, it is possible to map the memory mapped
IO at a different address range. It is the bootloader which determines
this. There are some Marvell uboot's which use 0xd0000000, not
0xf0000000. So strictly speaking, f1072004 is not stable, it is not
hard wired in the silicon.
Andrew
prev parent reply other threads:[~2021-10-04 12:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20211001133057.5287f150@thinkpad>
[not found] ` <YVb/HSLqcOM6drr1@lunn.ch>
[not found] ` <20211001144053.3952474a@thinkpad>
2021-10-03 20:53 ` are device names part of sysfs ABI? (was Re: devicename part of LEDs under ethernet MAC / PHY) Marek Behún
2021-10-04 6:37 ` Greg Kroah-Hartman
2021-10-04 7:04 ` Marek Behún
2021-10-04 7:10 ` Greg Kroah-Hartman
2021-10-04 7:25 ` Marek Behún
2021-10-04 7:38 ` Pavel Machek
2021-10-04 8:30 ` Greg Kroah-Hartman
2021-10-04 12:14 ` Andrew Lunn [this message]
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=YVrwDbZYqs05d1wu@lunn.ch \
--to=andrew@lunn.ch \
--cc=gregkh@linuxfoundation.org \
--cc=jacek.anaszewski@gmail.com \
--cc=kabel@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pavel@ucw.cz \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox