Skip to content

Commit

Permalink
hardirq.h: needs sched.h if using BKL
Browse files Browse the repository at this point in the history
This really isn't the right thing to do, and strictly speaking we should
have the BKL depth count in the thread info right next to the preempt
count.  The two really do go together.

However, since that would involve a patch to all architectures, and the
BKL is finally going away, it's simply not worth the effort to do the
RightThing(tm).  Just re-instate the <linux/sched.h> include that we
used to get accidentally from the smp_lock.h one.

This is all fallout from the same old "BKL: remove extraneous #include
<smp_lock.h>" commit.

Reported-by: Ingo Molnar <mingo@elte.hu>
Tested-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Linus Torvalds committed Nov 18, 2010
1 parent fb3ff69 commit ed1d77b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/linux/hardirq.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
#define in_nmi() (preempt_count() & NMI_MASK)

#if defined(CONFIG_PREEMPT) && defined(CONFIG_BKL)
# include <linux/sched.h>
# define PREEMPT_INATOMIC_BASE (current->lock_depth >= 0)
#else
# define PREEMPT_INATOMIC_BASE 0
Expand Down

0 comments on commit ed1d77b

Please sign in to comment.