diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-20 21:30:37 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-20 21:30:37 -0500 |
commit | 2b1caf6ed7b888c95a1909d343799672731651a5 (patch) | |
tree | 7ab9a7ae13bc02376bce6267df67f6f2aa9091f1 /init | |
parent | d551d81d6a720542873f478def60baab6b5df403 (diff) | |
parent | bd924e8cbd4b73ffb7d707a774c04f7e2cae88ed (diff) |
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
smp: Allow on_each_cpu() to be called while early_boot_irqs_disabled status to init/main.c
lockdep: Move early boot local IRQ enable/disable status to init/main.c
Diffstat (limited to 'init')
-rw-r--r-- | init/main.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/init/main.c b/init/main.c index 00799c1d4628..33c37c379e96 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -96,6 +96,15 @@ static inline void mark_rodata_ro(void) { } | |||
96 | extern void tc_init(void); | 96 | extern void tc_init(void); |
97 | #endif | 97 | #endif |
98 | 98 | ||
99 | /* | ||
100 | * Debug helper: via this flag we know that we are in 'early bootup code' | ||
101 | * where only the boot processor is running with IRQ disabled. This means | ||
102 | * two things - IRQ must not be enabled before the flag is cleared and some | ||
103 | * operations which are not allowed with IRQ disabled are allowed while the | ||
104 | * flag is set. | ||
105 | */ | ||
106 | bool early_boot_irqs_disabled __read_mostly; | ||
107 | |||
99 | enum system_states system_state __read_mostly; | 108 | enum system_states system_state __read_mostly; |
100 | EXPORT_SYMBOL(system_state); | 109 | EXPORT_SYMBOL(system_state); |
101 | 110 | ||
@@ -554,7 +563,7 @@ asmlinkage void __init start_kernel(void) | |||
554 | cgroup_init_early(); | 563 | cgroup_init_early(); |
555 | 564 | ||
556 | local_irq_disable(); | 565 | local_irq_disable(); |
557 | early_boot_irqs_off(); | 566 | early_boot_irqs_disabled = true; |
558 | 567 | ||
559 | /* | 568 | /* |
560 | * Interrupts are still disabled. Do necessary setups, then | 569 | * Interrupts are still disabled. Do necessary setups, then |
@@ -621,7 +630,7 @@ asmlinkage void __init start_kernel(void) | |||
621 | if (!irqs_disabled()) | 630 | if (!irqs_disabled()) |
622 | printk(KERN_CRIT "start_kernel(): bug: interrupts were " | 631 | printk(KERN_CRIT "start_kernel(): bug: interrupts were " |
623 | "enabled early\n"); | 632 | "enabled early\n"); |
624 | early_boot_irqs_on(); | 633 | early_boot_irqs_disabled = false; |
625 | local_irq_enable(); | 634 | local_irq_enable(); |
626 | 635 | ||
627 | /* Interrupts are enabled now so all GFP allocations are safe. */ | 636 | /* Interrupts are enabled now so all GFP allocations are safe. */ |