lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 18 Dec 2020 16:14:08 -0400
From:   Jason Gunthorpe <>
To:     Lee Jones <>
Cc:     Mark Brown <>,
        Greg KH <>,
        Alexandre Belloni <>,
        Dan Williams <>,
        Pierre-Louis Bossart <>,, Kiran Patil <>,
        linux-rdma <>,
        Shiraz Saleem <>,
        Martin Habets <>,
        Liam Girdwood <>,
        Ranjani Sridharan <>,
        Fred Oh <>,
        Dave Ertman <>,
        Jakub Kicinski <>,
        Netdev <>,
        Leon Romanovsky <>,
        David Miller <>,
        Linux Kernel Mailing List <>,
        Parav Pandit <>
Subject: Re: [resend/standalone PATCH v4] Add auxiliary bus support

On Fri, Dec 18, 2020 at 07:09:11PM +0000, Lee Jones wrote:

> ACPI, DT and MFD are not busses.  

And yet ACPI and PNP have a bus:
  extern struct bus_type acpi_bus_type;
  extern struct bus_type pnp_bus_type;

Why? Because in the driver core if you subclass struct device and want
to bind drivers, as both PNP and ACPI do, you must place those devices
on a bus with a bus_type matching the device type. Thus subclassing
the device means subclassing the bus as well.

The purpose of the bus_type is to match drivers to devices and provide
methods to the driver core. The bus_type also defines the unique name
space of the device names.

It is confusing because the word bus immediately makes people think of
physical objects like I2C, PCI, etc, but that is not what bus_type
does in the object model of the driver core, IMHO.

So, if you subclass struct device for MFD's usage, then you must also
create a bus_type to handle driver binding. The MFD bus_type. Just
like auxillary does.

Making a mfd subclass is the logical thing for a subsystem to do,
co-opting another subsystem's bus_type is just really weird/abusive.

auxillary bus shows how all these parts work, and it is simple enough
to see the pieces clearly.


Powered by blists - more mailing lists