lkml.org 
[lkml]   [2010]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: linux-next: PowerPC WARN_ON_ONCE() after merge of the final tree (tip related)

    * Frederic Weisbecker <fweisbec@gmail.com> wrote:

    > On Thu, Apr 15, 2010 at 04:03:58PM +0200, Ingo Molnar wrote:
    > > >
    > > >
    > > > diff --git a/kernel/lockdep.c b/kernel/lockdep.c
    > > > index 78325f8..65d4336 100644
    > > > --- a/kernel/lockdep.c
    > > > +++ b/kernel/lockdep.c
    > > > @@ -2298,7 +2298,11 @@ void trace_hardirqs_on_caller(unsigned long ip)
    > > > return;
    > > >
    > > > if (unlikely(curr->hardirqs_enabled)) {
    > > > + unsigned long flags;
    > > > +
    > > > + raw_local_irq_save(flags);
    > > > debug_atomic_inc(redundant_hardirqs_on);
    > > > + raw_local_irq_restore(flags);
    > > > return;
    > > > }
    > > > /* we'll do an OFF -> ON transition: */
    > >
    > > that looks rather ugly. Why not do a raw:
    > >
    > > this_cpu_inc(lockdep_stats.redundant_hardirqs_on);
    > >
    > > which basically open-codes debug_atomic_inc(), but without the warning?
    >
    >
    > There is also no guarantee we are in a non-preemptable section. We can then
    > also race against another cpu.
    >
    > I'm not sure what to do.

    it's a statistics counter so worst-case we lose a count. It's not a real issue
    - but might be worth adding a comment.

    Ingo


    \
     
     \ /
      Last update: 2010-04-15 19:43    [W:0.039 / U:60.420 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site