Messages in this thread | | | Subject | Re: [PATCH] preempt/hardirq.h: Clarify PREEMPT_ACTIVE bit location | From | Steven Rostedt <> | Date | Tue, 14 Aug 2012 08:46:34 -0400 |
| |
On Tue, 2012-08-14 at 12:18 +0200, Thomas Gleixner wrote: > On Tue, 14 Aug 2012, Srivatsa S. Bhat wrote: > > > > > By default, the PREEMPT_ACTIVE flag is bit 27, but different > > architectures can override that. Update the comment to reflect > > this fact. > > Is there any sensible reason why architectures need to override that? > I can't find one. > > If there is none, then we should just remove all the overrides from > the arch code instead. If there is a reason, then it should be > documented.
IIRC, when I added the NMI bits to implement 'in_nmi()' I tried to make this work across archs. But I found that bits in the preempt count have been hard coded in assembly all over the place, and to clean it up looked to be a nightmare.
It probably should be done, but I didn't have the time to do it then. Perhaps we can revisit it.
In fact, looking at all the archs, I believe all archs override the PREEMPT_ACTIVE bit, and not one of them uses the default (bit 27).
-- Steve
| |