Skip to content

Commit aa87717

Browse files
Boris OstrovskyIngo Molnar
authored andcommitted
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: a899418 ("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>
1 parent a0cba21 commit aa87717

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

arch/x86/kernel/smpboot.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,17 +1108,8 @@ int native_cpu_up(unsigned int cpu, struct task_struct *tidle)
11081108

11091109
common_cpu_up(cpu, tidle);
11101110

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-
11181111
err = do_boot_cpu(apicid, cpu, tidle);
1119-
11201112
if (err) {
1121-
irq_unlock_sparse();
11221113
pr_err("do_boot_cpu failed(%d) to wakeup CPU#%u\n", err, cpu);
11231114
return -EIO;
11241115
}
@@ -1136,8 +1127,6 @@ int native_cpu_up(unsigned int cpu, struct task_struct *tidle)
11361127
touch_nmi_watchdog();
11371128
}
11381129

1139-
irq_unlock_sparse();
1140-
11411130
return 0;
11421131
}
11431132

kernel/cpu.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,16 @@ static int bringup_cpu(unsigned int cpu)
349349
struct task_struct *idle = idle_thread_get(cpu);
350350
int ret;
351351

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+
352359
/* Arch-specific enabling code. */
353360
ret = __cpu_up(cpu, idle);
361+
irq_unlock_sparse();
354362
if (ret) {
355363
cpu_notify(CPU_UP_CANCELED, cpu);
356364
return ret;

0 commit comments

Comments
 (0)