diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2010-09-22 09:58:45 -0400 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2010-10-12 10:39:06 -0400 |
| commit | 154cd387cdf0e5566ce523cbddf92dd2a062dfd6 (patch) | |
| tree | 8ab329f26992c570b65fe62843275eb71c8bf505 | |
| parent | 3795de236d67a05994a1a12759db9d4dd9ffc42c (diff) | |
genirq: Remove early_init_irq_lock_class()
early_init_irq_lock_class() is called way before anything touches the
irq descriptors. In case of SPARSE_IRQ=y this is a NOP operation
because the radix tree is empty at this point. For the SPARSE_IRQ=n
case it's sufficient to set the lock class in early_init_irq().
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
| -rw-r--r-- | include/linux/lockdep.h | 8 | ||||
| -rw-r--r-- | init/main.c | 1 | ||||
| -rw-r--r-- | kernel/irq/irqdesc.c | 11 |
3 files changed, 1 insertions, 19 deletions
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 06aed8305bf3..17d050ce7ab8 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
| @@ -424,14 +424,6 @@ do { \ | |||
| 424 | 424 | ||
| 425 | #endif /* CONFIG_LOCKDEP */ | 425 | #endif /* CONFIG_LOCKDEP */ |
| 426 | 426 | ||
| 427 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
| 428 | extern void early_init_irq_lock_class(void); | ||
| 429 | #else | ||
| 430 | static inline void early_init_irq_lock_class(void) | ||
| 431 | { | ||
| 432 | } | ||
| 433 | #endif | ||
| 434 | |||
| 435 | #ifdef CONFIG_TRACE_IRQFLAGS | 427 | #ifdef CONFIG_TRACE_IRQFLAGS |
| 436 | extern void early_boot_irqs_off(void); | 428 | extern void early_boot_irqs_off(void); |
| 437 | extern void early_boot_irqs_on(void); | 429 | extern void early_boot_irqs_on(void); |
diff --git a/init/main.c b/init/main.c index 94ab488039aa..9684c9670b48 100644 --- a/init/main.c +++ b/init/main.c | |||
| @@ -556,7 +556,6 @@ asmlinkage void __init start_kernel(void) | |||
| 556 | 556 | ||
| 557 | local_irq_disable(); | 557 | local_irq_disable(); |
| 558 | early_boot_irqs_off(); | 558 | early_boot_irqs_off(); |
| 559 | early_init_irq_lock_class(); | ||
| 560 | 559 | ||
| 561 | /* | 560 | /* |
| 562 | * Interrupts are still disabled. Do necessary setups, then | 561 | * Interrupts are still disabled. Do necessary setups, then |
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c index fbf8cfa00510..0a7a0908afbc 100644 --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c | |||
| @@ -231,6 +231,7 @@ int __init early_irq_init(void) | |||
| 231 | alloc_desc_masks(&desc[i], 0, true); | 231 | alloc_desc_masks(&desc[i], 0, true); |
| 232 | init_desc_masks(&desc[i]); | 232 | init_desc_masks(&desc[i]); |
| 233 | desc[i].kstat_irqs = kstat_irqs_all[i]; | 233 | desc[i].kstat_irqs = kstat_irqs_all[i]; |
| 234 | lockdep_set_class(&desc[i].lock, &irq_desc_lock_class); | ||
| 234 | } | 235 | } |
| 235 | return arch_early_irq_init(); | 236 | return arch_early_irq_init(); |
| 236 | } | 237 | } |
| @@ -251,16 +252,6 @@ void clear_kstat_irqs(struct irq_desc *desc) | |||
| 251 | memset(desc->kstat_irqs, 0, nr_cpu_ids * sizeof(*(desc->kstat_irqs))); | 252 | memset(desc->kstat_irqs, 0, nr_cpu_ids * sizeof(*(desc->kstat_irqs))); |
| 252 | } | 253 | } |
| 253 | 254 | ||
| 254 | void early_init_irq_lock_class(void) | ||
| 255 | { | ||
| 256 | struct irq_desc *desc; | ||
| 257 | int i; | ||
| 258 | |||
| 259 | for_each_irq_desc(i, desc) { | ||
| 260 | lockdep_set_class(&desc->lock, &irq_desc_lock_class); | ||
| 261 | } | ||
| 262 | } | ||
| 263 | |||
| 264 | unsigned int kstat_irqs_cpu(unsigned int irq, int cpu) | 255 | unsigned int kstat_irqs_cpu(unsigned int irq, int cpu) |
| 265 | { | 256 | { |
| 266 | struct irq_desc *desc = irq_to_desc(irq); | 257 | struct irq_desc *desc = irq_to_desc(irq); |
