Re: [PATCH] De-macro spin_trylock_irq, spin_trylock_irqsave,write_trylock_irqsave

From: David Miller
Date: Sun Aug 17 2008 - 03:53:10 EST


From: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 16 Aug 2008 14:21:41 -0700 (PDT)

>
>
> On Sun, 17 Aug 2008, Alexey Dobriyan wrote:
>
> > On Sat, Aug 16, 2008 at 03:31:00PM +0200, Jiri Slaby wrote:
> > >
> > > Doesn't this break on sparc -- is it tested there?
> >
> > What's so special about sparc?
>
> Sparc _used_ to save/restore the whole processor flags word with the irq
> flags. That includes, iirc, things like the register window crap, so if
> you did a save/restore flags in a function, it would get all that wrong
> and things would blow up.
>
> However, I don't think sparc has actually done that for a _loong_ time
> now, due to it always being problematic.

We fixed it.

Although I still sometimes consider saving and restoring cpu IRQ flags
in different function contexts to be on the ugly side :)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/