Messages in this thread | | | Subject | Re: v2.6.21-rt2 | From | Daniel Walker <> | Date | Wed, 16 May 2007 14:47:16 -0700 |
| |
On Wed, 2007-05-16 at 23:32 +0200, Ingo Molnar wrote: > * Daniel Walker <dwalker@mvista.com> wrote: > > > > > http://lkml.org/lkml/2007/5/3/368 > > > > > > hm - trace_hardirqs_on() should never be called with irqs on - > > > lockdep could break for example. Could you try to fix the call site > > > instead? > > > > If that's the case why check if they're enabled inside > > trace_hardirqs_on() ? If that check fails you still still get the > > warning in my original release .. > > yeah, indeed you are right - it checks the soft flag. But even then, the > better fix is to check for hardirqs-off first and not to flip around the > preempt count check in irqs_off_preempt_count() - i.e. something like > the patch below. Does this solve the warning you've triggered with > irqsoff-tracing enabled?
I don't know. irqs_off_preempt_count() could get used someplace else, where you would want to flip the preempt_count() check .. It seems sane to combine your patch with mine ..
irqs_off_preempt_count() (!__get_cpu_var(trace_cpu_idle) && preempt_count())
You can't call __get_cpu_var() without the a positive preempt_count(), so the check seems backwards regardless of the other factors ..
Daniel
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |