On Sun, Mar 25, 2007 at 02:36:09PM -0800, Andrew Morton wrote:
> On Sun, 25 Mar 2007 23:02:21 +0400 Alexey Dobriyan <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to