[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20070327180836.GA5308@martell.zuzino.mipt.ru>
Date: Tue, 27 Mar 2007 22:08:36 +0400
From: Alexey Dobriyan <adobriyan@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: ecashin@...aid.com, linux-kernel@...r.kernel.org,
kernel-janitors@...ts.osdl.org
Subject: Re: [PATCH] aoe, tb0219: fix late spin_lock_init() and friends
On Sun, Mar 25, 2007 at 02:36:09PM -0800, Andrew Morton wrote:
> On Sun, 25 Mar 2007 23:02:21 +0400 Alexey Dobriyan <adobriyan@...il.com> wrote:
> > Some drivers do register_chrdev() before lock or semaphore used in
> > corresponding file_operations is initialized.
> > --- a/drivers/char/tb0219.c
> > +++ b/drivers/char/tb0219.c
> > @@ -287,6 +287,8 @@ static int __devinit tb0219_probe(struct
> > {
> > int retval;
> >
> > + spin_lock_init(&tb0219_lock);
> > +
> > if (request_mem_region(TB0219_START, TB0219_SIZE, "TB0219") == NULL)
> > return -EBUSY;
> >
> > @@ -304,8 +306,6 @@ static int __devinit tb0219_probe(struct
> > return retval;
> > }
> >
> > - spin_lock_init(&tb0219_lock);
> > -
> > old_machine_restart = _machine_restart;
> > _machine_restart = tb0219_restart;
> >
>
> These locks can and should be initialised at compile-time.
Documentation mentions that
- it [dynamic spinlock initialization] hurts automatic lock validators
- it becomes intrusive for the realtime preemption patches
First reason is clearly bogus, how relevant is the second one?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists