aboutsummaryrefslogtreecommitdiffstats
path: root/init/main.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-01-23 12:22:16 -0500
committerChris Wilson <chris@chris-wilson.co.uk>2011-01-24 13:27:32 -0500
commit8a327f23e23fa509e6e3c2263ae1cc0a67dec387 (patch)
tree119abf09e1ec9babaf78e6889187f9d54864b118 /init/main.c
parent5a9a8d1a99c617df82339456fbdd30d6ed3a856b (diff)
parentd315777b32a4696feb86f2a0c9e9f39c94683649 (diff)
Merge remote branch 'linus/master' into drm-intel-fixes
Merge with Linus to resolve conflicting fixes for the reusing the stale HEAD value during intel_ring_wait(). Conflicts: drivers/gpu/drm/i915/intel_ringbuffer.c
Diffstat (limited to 'init/main.c')
-rw-r--r--init/main.c13
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) { }
96extern void tc_init(void); 96extern 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 */
106bool early_boot_irqs_disabled __read_mostly;
107
99enum system_states system_state __read_mostly; 108enum system_states system_state __read_mostly;
100EXPORT_SYMBOL(system_state); 109EXPORT_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. */