lock validator: early_init_irq_lock_type / console_init
PATCH 4/8 lock validator: early_init_irq_lock_type / console_init
From: Heiko Carstens <[email protected]>
Two changes:
- let the kernel compile for architectures that support TRACE_IRQ_FLAGS but don't support GENERIC_HARDIRQS.
- s390's console_init must enable interrupts, but early_boot_irqs_on() gets called later. To avoid problems move console_init() after local_irq_enable(). Hope this works on all architectures?!
Signed-off-by Heiko Carstens <[email protected]>
---
include/linux/lockdep.h | 8 ++++++-- init/main.c | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-)
include/linux/lockdep.h +6 -2
@@ -265,12 +265,16 @@ static inline void lockdep_on(void)struct lockdep_type_key { };#endif /* !LOCKDEP */ -#ifdef CONFIG_TRACE_IRQFLAGS +#if defined(CONFIG_TRACE_IRQFLAGS ) && defined(CONFIG_GENERIC_HARDIRQS )extern void early_init_irq_lock_type (void ); +#else +# define early_init_irq_lock_type () do { } while (0) +#endif + +#ifdef CONFIG_TRACE_IRQFLAGS extern void early_boot_irqs_off (void );extern void early_boot_irqs_on (void );#else -# define early_init_irq_lock_type () do { } while (0)# define early_boot_irqs_off () do { } while (0)# define early_boot_irqs_on () do { } while (0)#endif
init/main.c +3 -3
@@ -516,6 +516,9 @@ asmlinkage void __init start_kernel(voidsoftirq_init ();time_init ();timekeeping_init (); +profile_init (); +early_boot_irqs_on (); +local_irq_enable ();/* * HACK ALERT! This is early. We're enabling the console before
@@ -525,9 +528,6 @@ asmlinkage void __init start_kernel(voidconsole_init ();if (panic_later)panic (panic_later, panic_param); -profile_init (); -early_boot_irqs_on (); -local_irq_enable ();lockdep_info ();