netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: "Enrico Weigelt, metux IT consult" <lkml@metux.net>
Cc: "Enrico Weigelt, metux IT consult" <info@metux.net>,
	linux-kernel@vger.kernel.org, linus.walleij@linaro.org,
	bgolaszewski@baylibre.com, dmitry.torokhov@gmail.com,
	jacek.anaszewski@gmail.com, pavel@ucw.cz, dmurphy@ti.com,
	arnd@arndb.de, masahiroy@kernel.org, michal.lkml@markovi.net,
	kafai@fb.com, songliubraving@fb.com, yhs@fb.com, andriin@fb.com,
	linux-gpio@vger.kernel.org, linux-input@vger.kernel.org,
	linux-leds@vger.kernel.org, linux-arch@vger.kernel.org,
	linux-kbuild@vger.kernel.org, netdev@vger.kernel.org,
	bpf@vger.kernel.org
Subject: Re: [PATCH] RFC: platform driver registering via initcall tables
Date: Tue, 17 Dec 2019 15:06:46 +0100	[thread overview]
Message-ID: <20191217140646.GC3489463@kroah.com> (raw)
In-Reply-To: <6422bc88-6d0a-7b51-aaa7-640c6961b177@metux.net>

On Tue, Dec 17, 2019 at 02:44:39PM +0100, Enrico Weigelt, metux IT consult wrote:
> On 17.12.19 11:31, Greg KH wrote:
> 
> Hi,
> 
> > No, what is so "special" about platform drivers that they require this?
> 
> Nothing, of course ;-)
> 
> It's the the starting point for this PoC. The idea actually is doing
> this for all other driver types, too (eg. spi, pci, usb, ...). But
> they'll need their own tables, as different *_register() functions have
> to be called - just haven't implemented that yet.

That's not needed, and you are going to break the implicit ordering we
already have with link order.  You are going to have to figure out what
bus type the driver is, to determine what segment it was in, to figure
out what was loaded before what.

Not good.

> > If anything, we should be moving _AWAY_ from platform drivers and use
> > real bus drivers instead.
> 
> That would be nice, but, unfortunately, we have lots of devices which
> aren't attached to any (probing-capable) bus. That's why we have things
> like oftree, etc.
> 
> > Please no, I don't see why this is even needed.
> 
> The idea is getting rid of all the init code, which all just does the
> same, just calls some *_register() function.

There's no need to get rid of it, what are you trying to save here?  How
can you be sure init order is still the same?

thanks,

greg k-h

  reply	other threads:[~2019-12-17 14:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-17 10:22 [PATCH] RFC: platform driver registering via initcall tables Enrico Weigelt, metux IT consult
2019-12-17 10:31 ` Greg KH
2019-12-17 13:44   ` Enrico Weigelt, metux IT consult
2019-12-17 14:06     ` Greg KH [this message]
2019-12-17 14:43       ` Enrico Weigelt, metux IT consult
2019-12-17 14:50         ` Greg KH

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=20191217140646.GC3489463@kroah.com \
    --to=greg@kroah.com \
    --cc=andriin@fb.com \
    --cc=arnd@arndb.de \
    --cc=bgolaszewski@baylibre.com \
    --cc=bpf@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dmurphy@ti.com \
    --cc=info@metux.net \
    --cc=jacek.anaszewski@gmail.com \
    --cc=kafai@fb.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=lkml@metux.net \
    --cc=masahiroy@kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=netdev@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).