mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Arnd Bergmann <arnd@arndb.de>
Cc: anish singh <anish198519851985@gmail.com>,
	Grant Likely <grant.likely@secretlab.ca>,
	Haojian Zhuang <haojian.zhuang@linaro.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	viro@zeniv.linux.org.uk, rusty@rustcorp.com.au,
	hpa@linux.intel.com, jim.cromie@gmail.com,
	linux-kernel@vger.kernel.org,
	Linus Walleij <linus.walleij@linaro.org>,
	broonie@opensource.wolfsonmicro.com,
	Patch Tracking <patches@linaro.org>
Subject: Re: [PATCH] driver core: add wait event for deferred probe
Date: Thu, 14 Feb 2013 10:04:52 +0000	[thread overview]
Message-ID: <20130214100452.GF17833@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <201302140956.36843.arnd@arndb.de>

On Thu, Feb 14, 2013 at 09:56:36AM +0000, Arnd Bergmann wrote:
> I would put it this way: With the introduction of deferred probing, the
> rules for the use of __init sections have changed slightly for some
> corner cases. While normal device drivers can, as before, not call
> __init functions from their .probe() callbacks, we could do that in
> drivers as long as they were built-in and did not support hotplug,
> and that exception was used in console drivers. This exception has
> now become more specific, and those drivers also must not use
> deferred probing that depends on other loadable modules or hotpluggable
> devices.

In the general case, that remains true, but it's still _not_ true for
console drivers.

The console _should_ be initialised before it is attempted to be opened
before passing control to userspace, which happens before the .init
section is freed.

If the console is deferred past that point, then userspace has no console.
The behaviour of userspace in that situation can be very interesting, and
I'd suggest that such is not well tested; consider the effect of not
having fd 0,1,2 connected to something like a console but your filesystem
and something doing a printf().  You can hope that userspace will take
care of that condition, but I personally would not put much faith in it.

With the plethora of 'init' daemon solutions we now have, I have less
faith than I used to that such a condition would be correctly handled
by all of them.

  reply	other threads:[~2013-02-14 10:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-09 16:57 Haojian Zhuang
2013-02-11 23:10 ` Andrew Morton
2013-02-12  2:52   ` Haojian Zhuang
2013-02-13 21:36     ` Grant Likely
2013-02-14  3:27       ` anish singh
2013-02-14  9:56         ` Arnd Bergmann
2013-02-14 10:04           ` Russell King - ARM Linux [this message]
2013-02-14 11:08             ` Arnd Bergmann
2013-02-14 16:33         ` Grant Likely
2013-02-14 17:42           ` anish kumar
2013-02-14 15:52       ` Haojian Zhuang
2013-02-14 15:57         ` Arnd Bergmann
2013-02-14 16:04           ` Haojian Zhuang
2013-02-14 16:50             ` Arnd Bergmann
2013-02-14 16:58               ` Haojian Zhuang
2013-02-14 17:54                 ` Grant Likely
2013-02-14 17:42           ` Grant Likely
2013-02-14 17:38         ` Grant Likely

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=20130214100452.GF17833@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=anish198519851985@gmail.com \
    --cc=arnd@arndb.de \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=grant.likely@secretlab.ca \
    --cc=gregkh@linuxfoundation.org \
    --cc=haojian.zhuang@linaro.org \
    --cc=hpa@linux.intel.com \
    --cc=jim.cromie@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=rusty@rustcorp.com.au \
    --cc=viro@zeniv.linux.org.uk \
    /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

Powered by JetHome