lkml.org 
[lkml]   [2021]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: are device names part of sysfs ABI? (was Re: devicename part of LEDs under ethernet MAC / PHY)
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

\
 
 \ /
  Last update: 2021-10-04 14:14    [W:0.059 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site