mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 00:51:35 +00:00
lockdep: Move early boot local IRQ enable/disable status to init/main.c
During early boot, local IRQ is disabled until IRQ subsystem is properly initialized. During this time, no one should enable local IRQ and some operations which usually are not allowed with IRQ disabled, e.g. operations which might sleep or require communications with other processors, are allowed. lockdep tracked this with early_boot_irqs_off/on() callbacks. As other subsystems need this information too, move it to init/main.c and make it generally available. While at it, toggle the boolean to early_boot_irqs_disabled instead of enabled so that it can be initialized with %false and %true indicates the exceptional condition. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Pekka Enberg <penberg@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> LKML-Reference: <20110120110635.GB6036@htj.dyndns.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
12fcdba1b7
commit
2ce802f62b
6 changed files with 15 additions and 36 deletions
|
@ -2291,22 +2291,6 @@ mark_held_locks(struct task_struct *curr, enum mark_type mark)
|
|||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Debugging helper: via this flag we know that we are in
|
||||
* 'early bootup code', and will warn about any invalid irqs-on event:
|
||||
*/
|
||||
static int early_boot_irqs_enabled;
|
||||
|
||||
void early_boot_irqs_off(void)
|
||||
{
|
||||
early_boot_irqs_enabled = 0;
|
||||
}
|
||||
|
||||
void early_boot_irqs_on(void)
|
||||
{
|
||||
early_boot_irqs_enabled = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Hardirqs will be enabled:
|
||||
*/
|
||||
|
@ -2319,7 +2303,7 @@ void trace_hardirqs_on_caller(unsigned long ip)
|
|||
if (unlikely(!debug_locks || current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
if (DEBUG_LOCKS_WARN_ON(unlikely(!early_boot_irqs_enabled)))
|
||||
if (DEBUG_LOCKS_WARN_ON(unlikely(early_boot_irqs_disabled)))
|
||||
return;
|
||||
|
||||
if (unlikely(curr->hardirqs_enabled)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue