Messages in this thread Patch in this message |  | | | From | Arnd Bergmann <> | | Subject | [PATCH] preempt: fix kernel build with !CONFIG_BKL | | Date | Thu, 28 Oct 2010 13:20:44 +0200 |
| |
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@arndb.de> Reported-by: "Kirill A. Shutemov" <kirill@shutemov.name>
--- > /home/kas/git/tmp/linux-2.6-local/arch/x86/include/asm/i387.h: In function ‘irq_ts_save’: > /home/kas/git/tmp/linux-2.6-local/arch/x86/include/asm/i387.h:324: error: implicit declaration of function ‘kernel_locked’ > make[1]: *** [arch/x86/kernel/asm-offsets.s] Error 1 > make: *** [prepare0] Error 2 Ah, found it. I had not considered or tested the case of CONFIG_BKL=n with CONFIG_PREEMPT=y.
Does this work? Ideally please test with LOCKDEP enabled to see if there are other problems in this configuration that I missed.
--- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h @@ -96,7 +96,7 @@ */ #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 -- 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/
|  |