Re: Linus rollup

Andrea Arcangeli
2003-01-30T00:46:00Z

On Wed, Jan 29, 2003 at 02:35:52PM -0800, Stephen Hemminger wrote:
> On Wed, 2003-01-29 at 02:26, Andrew Morton wrote:
> > "David S. Miller" <davem@redhat.com> wrote:
> > >
> > > From: Russell King <rmk@arm.linux.org.uk>
> > > Date: Wed, 29 Jan 2003 09:59:49 +0000
> > >
> > > /* This function must be called with interrupts disabled
> > >
> > > which hasn't been true for some time, and is even less true now that
> > > local IRQs don't get disabled. Does this matter... for UP?
> > >
> > > I disable local IRQs during gettimeofday() on sparc.
> > >
> > > These locks definitely need to be taken with IRQs disabled.
> > > Why isn't x86 doing that?
> >
> > Darned if I know. Looks like Andrea's kernel will deadlock if
> > arch/i386/kernel/time.c:timer_interrupt() takes i8253_lock
> > while that cpu is holding the same lock in do_slow_gettimeoffset().
>
> Rather than disabling interrupts in the i386 do_gettimeofday
> why not just change spin_lock(&i8253_lock) to spin_lock_irqsave
> in timer_pit.c

as you can see from my patch, I agree

Andrea