History

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().

Thomas Gleixner committed 16 years ago

Commit 154cd381 parent 3795de23 files · +1 −19Browse files

Unified · Split

3 files
  1. include/linux/lockdep.h +0 −8
  2. init/main.c +0 −1
  3. kernel/irq/irqdesc.c +1 −10
include/linux/lockdep.h+0−8
@@ -424,14 +424,6 @@ do { \ · 423 unmodified lines
424424
425425 #endif /* CONFIG_LOCKDEP */
426426
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−
435427 #ifdef CONFIG_TRACE_IRQFLAGS
436428 extern void early_boot_irqs_off(void);
437429 extern void early_boot_irqs_on(void);
init/main.c+0−1
@@ -556,7 +556,6 @@ asmlinkage void __init start_kernel(void) · 555 unmodified lines
556556
557557 local_irq_disable();
558558 early_boot_irqs_off();
559− early_init_irq_lock_class();
560559
561560 /*
562561 * Interrupts are still disabled. Do necessary setups, then
kernel/irq/irqdesc.c+1−10
@@ -231,6 +231,7 @@ int __init early_irq_init(void) · 230 unmodified lines
231231 alloc_desc_masks(&desc[i], 0, true);
232232 init_desc_masks(&desc[i]);
233233 desc[i].kstat_irqs = kstat_irqs_all[i];
234+ lockdep_set_class(&desc[i].lock, &irq_desc_lock_class);
234235 }
235236 return arch_early_irq_init();
236237 }
@@ -251,16 +252,6 @@ void clear_kstat_irqs(struct irq_desc *desc) · 14 unmodified lines
251252 memset(desc->kstat_irqs, 0, nr_cpu_ids * sizeof(*(desc->kstat_irqs)));
252253 }
253254
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−
264255 unsigned int kstat_irqs_cpu(unsigned int irq, int cpu)
265256 {
266257 struct irq_desc *desc = irq_to_desc(irq);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t