From: David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
To: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
Cc: i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
Subject: Re: [patch 2.6.27-rc7] i2c: guard against oopses from bad init sequences
Date: Wed, 24 Sep 2008 08:55:52 -0700 [thread overview]
Message-ID: <200809240855.53043.david-b@pacbell.net> (raw)
In-Reply-To: <20080924115527.315d2968-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
On Wednesday 24 September 2008, Jean Delvare wrote:
> Hi David,
>
> On Tue, 23 Sep 2008 11:38:19 -0700, David Brownell wrote:
> > From: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
> >
> > Guard I2C against oopsing because of init sequence problems...
> >
> > Alternatively have postcore_initcall(i2c_init), which may
> > be better ... the initcall levels are pretty limited, and
> > in these cases the "subsystem" of interest builds on I2C
> > and needs to work before device_initcall. Having I2C use
> > subsys_initcall kind of forces things into fs_initcall.
> >
> > I'd encourage the anti-oopsing paranoia in any case, even
> > if i2c switches to postcore_initcall (or earlier).
>
> I'm confused. If i2c_register_adapter() is called before i2c_init(),
> your patch prevents an oops, but things will still not work, right?
And it warns about exactly where the problem came from,
because of the WARN_ON. That addresses a long-standing
debuggability problem which has afflicted these issues.
> So
> this doesn't seem to add much value. In any case we need to fix the
> init sequence, so let's just do that.
I'll send in a separate patch switching the driver model init
to a postcore_initcall() -- it's not arch-specific and there
seems no reason to have it earlier.
Semi-related: that module init/exit code is at a wierd place,
in the middle of that file ... vs the conventional location at
the end. OK to change that? In the same patch, or separate?
- Dave
_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c
next prev parent reply other threads:[~2008-09-24 15:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-23 18:38 [patch 2.6.27-rc7] i2c: guard against oopses from bad init sequences David Brownell
[not found] ` <200809231138.19583.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-09-24 9:55 ` Jean Delvare
[not found] ` <20080924115527.315d2968-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-09-24 15:55 ` David Brownell [this message]
2008-09-30 9:29 ` Jean Delvare
[not found] ` <20080930112920.11d0326c-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-09-30 15:50 ` David Brownell
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=200809240855.53043.david-b@pacbell.net \
--to=david-b-ybekhbn/0ldr7s880joybq@public.gmane.org \
--cc=i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org \
--cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.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