lkml.org 
[lkml]   [2010]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRe: [build failure] Re: BKL: remove extraneous #include <smp_lock.h>
On Thu, Nov 18, 2010 at 7:57 AM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> How painful would it be to move lock_depth into thread_struct? I guess
> we don't have anything that cares about structure offsets in assembly
> for that thing.  I should just try.

Gaah, the only generic field there is the restart_block, so we'd have
to hide it there, or then add it to each architecture. So scratch
that.

I guess this is the simplest approach.

Linus
include/linux/hardirq.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h
index 714da7e..32f9fd6 100644
--- a/include/linux/hardirq.h
+++ b/include/linux/hardirq.h
@@ -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
\
 
 \ /
  Last update: 2010-11-18 17:05    [W:0.047 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site