diff options
author | Boris Ostrovsky <boris.ostrovsky@oracle.com> | 2016-08-03 13:22:28 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-08-10 09:42:57 -0400 |
commit | aa877175e7a9982233ed8f10cb4bfddd78d82741 (patch) | |
tree | a97d5017cec83ee19a42c59b7c99f26a70cd044a | |
parent | a0cba2179ea4c1820fce2ee046b6ed90ecc56196 (diff) |
cpu/hotplug: Prevent alloc/free of irq descriptors during CPU up/down (again)
Now that Xen no longer allocates irqs in _cpu_up() we can restore
commit:
a89941816726 ("hotplug: Prevent alloc/free of irq descriptors during cpu up/down")
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Anna-Maria Gleixner <anna-maria@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: david.vrabel@citrix.com
Cc: xen-devel@lists.xenproject.org
Link: http://lkml.kernel.org/r/1470244948-17674-3-git-send-email-boris.ostrovsky@oracle.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | arch/x86/kernel/smpboot.c | 11 | ||||
-rw-r--r-- | kernel/cpu.c | 8 |
2 files changed, 8 insertions, 11 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 2a6e84a30a54..067de612d3fa 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -1108,17 +1108,8 @@ int native_cpu_up(unsigned int cpu, struct task_struct *tidle) | |||
1108 | 1108 | ||
1109 | common_cpu_up(cpu, tidle); | 1109 | common_cpu_up(cpu, tidle); |
1110 | 1110 | ||
1111 | /* | ||
1112 | * We have to walk the irq descriptors to setup the vector | ||
1113 | * space for the cpu which comes online. Prevent irq | ||
1114 | * alloc/free across the bringup. | ||
1115 | */ | ||
1116 | irq_lock_sparse(); | ||
1117 | |||
1118 | err = do_boot_cpu(apicid, cpu, tidle); | 1111 | err = do_boot_cpu(apicid, cpu, tidle); |
1119 | |||
1120 | if (err) { | 1112 | if (err) { |
1121 | irq_unlock_sparse(); | ||
1122 | pr_err("do_boot_cpu failed(%d) to wakeup CPU#%u\n", err, cpu); | 1113 | pr_err("do_boot_cpu failed(%d) to wakeup CPU#%u\n", err, cpu); |
1123 | return -EIO; | 1114 | return -EIO; |
1124 | } | 1115 | } |
@@ -1136,8 +1127,6 @@ int native_cpu_up(unsigned int cpu, struct task_struct *tidle) | |||
1136 | touch_nmi_watchdog(); | 1127 | touch_nmi_watchdog(); |
1137 | } | 1128 | } |
1138 | 1129 | ||
1139 | irq_unlock_sparse(); | ||
1140 | |||
1141 | return 0; | 1130 | return 0; |
1142 | } | 1131 | } |
1143 | 1132 | ||
diff --git a/kernel/cpu.c b/kernel/cpu.c index 341bf80f80bd..ec12b726fa6f 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c | |||
@@ -349,8 +349,16 @@ static int bringup_cpu(unsigned int cpu) | |||
349 | struct task_struct *idle = idle_thread_get(cpu); | 349 | struct task_struct *idle = idle_thread_get(cpu); |
350 | int ret; | 350 | int ret; |
351 | 351 | ||
352 | /* | ||
353 | * Some architectures have to walk the irq descriptors to | ||
354 | * setup the vector space for the cpu which comes online. | ||
355 | * Prevent irq alloc/free across the bringup. | ||
356 | */ | ||
357 | irq_lock_sparse(); | ||
358 | |||
352 | /* Arch-specific enabling code. */ | 359 | /* Arch-specific enabling code. */ |
353 | ret = __cpu_up(cpu, idle); | 360 | ret = __cpu_up(cpu, idle); |
361 | irq_unlock_sparse(); | ||
354 | if (ret) { | 362 | if (ret) { |
355 | cpu_notify(CPU_UP_CANCELED, cpu); | 363 | cpu_notify(CPU_UP_CANCELED, cpu); |
356 | return ret; | 364 | return ret; |