[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201010281612.33732.arnd@arndb.de>
Date: Thu, 28 Oct 2010 16:12:33 +0200
From: Arnd Bergmann <arnd@...db.de>
To: "Kirill A. Shutemov" <kirill@...temov.name>
Cc: linux-kernel@...r.kernel.org, Avi Kivity <avi@...hat.com>,
Brian Gerst <brgerst@...il.com>,
David Howells <dhowells@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Pekka Enberg <penberg@...nel.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Suresh Siddha <suresh.b.siddha@...el.com>,
Thomas Gleixner <tglx@...utronix.de>,
Venkatesh Pallipadi <venki@...gle.com>, x86@...nel.org
Subject: [PATCH v2] preempt: fix kernel build with !CONFIG_BKL
The preempt count logic tries to take the BKL into account, which breaks
when CONFIG_BKL is not set.
Use the same preempt_count offset that we use without CONFIG_PREEMPT
when CONFIG_BKL is disabled.
Signed-off-by: Arnd Bergmann <arnd@...db.de>
Reported-by: Kirill Shutemov <kirill@...temov.name>
---
> On Thursday 28 October 2010, Kirill A. Shutemov wrote:
> On Thu, Oct 28, 2010 at 01:20:44PM +0200, Arnd Bergmann wrote:
> > The preempt count logic tries to take the BKL into account, which breaks
> > when CONFIG_BKL is not set.
> >
> > Use the same preempt_count offset that we use without CONFIG_PREEMPT
> > when CONFIG_BKL is disabled.
> >
> > Signed-off-by: Arnd Bergmann <arnd@...db.de>
> > Reported-by: "Kirill A. Shutemov" <kirill@...temov.name>
>
> Remove quotes, please.
That would make it an invalid email address because of the dot. I left out
the middle initial now, if that's better.
> I've got a lot of __schedule_bug. Log attached.
Ok. I really don't understand the preempt code all that well, let's
hope that this one is right.
Thanks for your patience and for your testing!
Arnd
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h
index 8a389b6..41cb31f 100644
--- a/include/linux/hardirq.h
+++ b/include/linux/hardirq.h
@@ -96,11 +96,15 @@
*/
#define in_nmi() (preempt_count() & NMI_MASK)
-#if defined(CONFIG_PREEMPT)
+#if defined(CONFIG_PREEMPT) && defined(CONFIG_BKL)
# define PREEMPT_INATOMIC_BASE kernel_locked()
-# define PREEMPT_CHECK_OFFSET 1
#else
# define PREEMPT_INATOMIC_BASE 0
+#endif
+
+#if defined(CONFIG_PREEMPT)
+# define PREEMPT_CHECK_OFFSET 1
+#else
# define PREEMPT_CHECK_OFFSET 0
#endif
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists