From: grant.likely@secretlab.ca (Grant Likely)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] tty: serial: remove __init on pl011 console ops
Date: Wed, 13 Feb 2013 21:04:59 +0000 [thread overview]
Message-ID: <20130213210459.D8F693E3557@localhost> (raw)
In-Reply-To: <20130209224138.GI17833@n2100.arm.linux.org.uk>
On Sat, 9 Feb 2013 22:41:38 +0000, Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> On Sat, Feb 09, 2013 at 10:31:05PM +0000, Grant Likely wrote:
> > If it is a probe function, then yes the __init annotations need to be
> > removed or the driver needs to use platform_driver_probe(). This has
> > been the model as long as I can remember. As long as a driver has a
> > .probe hook, the driver core can call it at any time. Deferred probe
> > has only exposed the issue.
> >
> > If you want to discard the .probe() hook, then the probe() pointer
> > needs to be cleared from the driver structure before discarding the
> > sections. Otherwise the driver core can still call it which is what
> > happens in deferred probe and can happen if a device gets unbound from
> > a driver and then re-attached.
>
> You're talking about something completely different on the assumption
> that what is being talked about is the probe hook. It isn't. It's
> a path for the console initialization which has _always_ been __init
> marked since the dawn of time, because modules are not supposed to
> be calling that path.
Sorry, you're right. Hitting reply too quickly I guess.
However, the point still stands that anything that can be called from
a .probe() path cannot be in an __init section with the current driver
model. A driver can even be unbound from a device and reattached at
runtime. That would also cause problems.
> What has been exposed is that console drivers which have resources
> which are not immediately available no longer have the same guarantees
> that they used to have (that is, they will be called before the __init
> section is given away.)
Okay, I'll reply to Haojian's proposed solution patch on this point.
g.
next prev parent reply other threads:[~2013-02-13 21:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-06 11:47 [PATCH 1/2] tty: serial: remove __init on pl011 console ops Haojian Zhuang
2013-02-06 11:47 ` [PATCH 2/2] tty: serial: use module_init on pl011_init Haojian Zhuang
2013-02-06 17:17 ` Linus Walleij
2013-02-06 11:52 ` [PATCH 1/2] tty: serial: remove __init on pl011 console ops Russell King - ARM Linux
2013-02-06 12:31 ` Haojian Zhuang
2013-02-06 16:31 ` Linus Walleij
2013-02-06 16:38 ` Russell King - ARM Linux
2013-02-06 16:46 ` Linus Walleij
2013-02-09 17:22 ` Haojian Zhuang
2013-02-09 22:31 ` Grant Likely
2013-02-09 22:41 ` Russell King - ARM Linux
2013-02-10 3:31 ` Haojian Zhuang
2013-02-13 21:21 ` Grant Likely
2013-02-13 21:04 ` Grant Likely [this message]
2013-02-13 22:52 ` Russell King - ARM Linux
2013-02-13 23:04 ` 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=20130213210459.D8F693E3557@localhost \
--to=grant.likely@secretlab.ca \
--cc=linux-arm-kernel@lists.infradead.org \
/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).