From e955b5398b660a204854bdff059d050b44090879 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Tue, 19 Aug 2008 20:50:37 -0700 Subject: sparseirq: fix lockdep -tip testing found this lockdep splat: [ 0.000000] Initializing CPU#0 [ 0.000000] found new irq_desc for irq 0 [ 0.000000] INFO: trying to register non-static key. [ 0.000000] the code is fine but needs lockdep annotation. [ 0.000000] turning off the locking correctness validator. [ 0.000000] Pid: 0, comm: swapper Not tainted 2.6.27-rc3-tip-00191-g98ccb89-dirty #1 [ 0.000000] [] register_lock_class+0x3d2/0x400 [ 0.000000] [] ? mcount_call+0x5/0xa [ 0.000000] [] __lock_acquire+0x22a/0x5d0 [ 0.000000] [] ? mcount_call+0x5/0xa [ 0.000000] [] lock_acquire+0x71/0xa0 [ 0.000000] [] ? set_irq_chip+0x3f/0x90 [ 0.000000] [] _spin_lock_irqsave+0x58/0x90 [ 0.000000] [] ? set_irq_chip+0x3f/0x90 [ 0.000000] [] set_irq_chip+0x3f/0x90 [ 0.000000] [] ? handle_level_irq+0x0/0xe0 [ 0.000000] [] set_irq_chip_and_handler_name+0x1a/0x40 [ 0.000000] [] init_ISA_irqs+0x51/0xa0 [ 0.000000] [] pre_intr_init_hook+0x25/0x30 [ 0.000000] [] native_init_IRQ+0x13/0x370 [ 0.000000] [] ? lock_release+0xcc/0x1d0 [ 0.000000] [] ? mcount_call+0x5/0xa [ 0.000000] [] ? __mutex_unlock_slowpath+0x92/0x110 [ 0.000000] [] ? mutex_unlock+0xd/0x10 [ 0.000000] [] ? cpu_maps_update_done+0x12/0x20 [ 0.000000] [] ? register_cpu_notifier+0x23/0x30 [ 0.000000] [] init_IRQ+0xe/0x10 [ 0.000000] [] start_kernel+0x1c5/0x340 [ 0.000000] [] ? unknown_bootoption+0x0/0x210 [ 0.000000] [] i386_start_kernel+0x6b/0x80 [ 0.000000] ======================= [ 0.000000] found new irq_desc for irq 1 [ 0.000000] found new irq_desc for irq 2 [ 0.000000] found new irq_desc for irq 3 this: static void init_one_irq_desc(struct irq_desc *desc) { memcpy(desc, &irq_desc_init, sizeof(struct irq_desc)); #ifdef CONFIG_TRACE_IRQFLAGS lockdep_set_class(&desc->lock, &irq_desc_lock_class); #endif } should be unconditional. Signed-off-by: Ingo Molnar --- kernel/irq/handle.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'kernel/irq/handle.c') diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c index 6d174390f3a..24c83a3cee4 100644 --- a/kernel/irq/handle.c +++ b/kernel/irq/handle.c @@ -18,13 +18,10 @@ #include "internals.h" -#ifdef CONFIG_TRACE_IRQFLAGS - /* * lockdep: we want to handle all irq_desc locks as a single lock-class: */ static struct lock_class_key irq_desc_lock_class; -#endif /** * handle_bad_irq - handle spurious and unhandled irqs @@ -75,9 +72,7 @@ static struct irq_desc irq_desc_init = { static void init_one_irq_desc(struct irq_desc *desc) { memcpy(desc, &irq_desc_init, sizeof(struct irq_desc)); -#ifdef CONFIG_TRACE_IRQFLAGS lockdep_set_class(&desc->lock, &irq_desc_lock_class); -#endif } extern int after_bootmem; -- cgit v1.2.3