summaryrefslogtreecommitdiffstats
path: root/kernel/cpu/idle.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-07-01 10:27:25 +0200
committerTakashi Iwai <tiwai@suse.de>2013-07-01 10:27:25 +0200
commitbc32134c0523c60989d2f2439e176601668a62a5 (patch)
tree03f63fc387e78592968a1f04ee4e173ca32fec20 /kernel/cpu/idle.c
parent1c6770a38a6652777b9d1592b66e0d8e7dfb6160 (diff)
parent066624c6a1733a72a67f1d06d35a2153e7d9082b (diff)
Merge branch 'for-next' into for-linus
Merge the whole changes for 3.11-rc1 merge
Diffstat (limited to 'kernel/cpu/idle.c')
-rw-r--r--kernel/cpu/idle.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/kernel/cpu/idle.c b/kernel/cpu/idle.c
index d5585f5e038..e695c0a0bcb 100644
--- a/kernel/cpu/idle.c
+++ b/kernel/cpu/idle.c
@@ -5,6 +5,7 @@
#include <linux/cpu.h>
#include <linux/tick.h>
#include <linux/mm.h>
+#include <linux/stackprotector.h>
#include <asm/tlb.h>
@@ -58,6 +59,7 @@ void __weak arch_cpu_idle_dead(void) { }
void __weak arch_cpu_idle(void)
{
cpu_idle_force_poll = 1;
+ local_irq_enable();
}
/*
@@ -112,6 +114,21 @@ static void cpu_idle_loop(void)
void cpu_startup_entry(enum cpuhp_state state)
{
+ /*
+ * This #ifdef needs to die, but it's too late in the cycle to
+ * make this generic (arm and sh have never invoked the canary
+ * init for the non boot cpus!). Will be fixed in 3.11
+ */
+#ifdef CONFIG_X86
+ /*
+ * If we're the non-boot CPU, nothing set the stack canary up
+ * for us. The boot CPU already has it initialized but no harm
+ * in doing it again. This is a good place for updating it, as
+ * we wont ever return from this function (so the invalid
+ * canaries already on the stack wont ever trigger).
+ */
+ boot_init_stack_canary();
+#endif
current_set_polling();
arch_cpu_idle_prepare();
cpu_idle_loop();