Re: [PATCH] asm-generic: Use raw_local_irq_save/restore insteadlocal_irq_save/restore

From: Yong Zhang
Date: Thu May 27 2010 - 05:13:12 EST


On Wed, May 26, 2010 at 01:11:51PM -0400, Steven Rostedt wrote:
> On Wed, 2010-05-26 at 10:08 -0700, Andrew Morton wrote:
>
> >
> > If a developer looks at atomic_add_return() and asks himself "why did
> > this use raw_local_irq_save()", the only way of answering that question
> > is to go groveling through the git logs, which is a right PITA if
> > you're trying to get some coding work done.
> >
> > Guys, any time you add code which is non-obvious at the raw C level, it
> > *needs* a comment!
>
> Totally agree! I've gotten pretty good at adding comments to changes
> like this that I do. I need to get better at telling others to comment
> their work ;-)

Cc'ed Frederic Weisbecker

Seems like this issue has been raised before:
http://marc.info/?l=linux-kernel&m=126292794806169&w=2

I'm afraid this patch will trigger lockdep warning if atomic_inc()
is used in some locks.
--
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/