]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
cpu/hotplug: Prevent alloc/free of irq descriptors during CPU up/down (again)
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Wed, 3 Aug 2016 17:22:28 +0000 (13:22 -0400)
committerIngo Molnar <mingo@kernel.org>
Wed, 10 Aug 2016 13:42:57 +0000 (15:42 +0200)
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>
arch/x86/kernel/smpboot.c
kernel/cpu.c

index 2a6e84a30a546f022331c653ec0725bd73086bc5..067de612d3fa902771cd266b7c41431228662a34 100644 (file)
@@ -1108,17 +1108,8 @@ int native_cpu_up(unsigned int cpu, struct task_struct *tidle)
 
        common_cpu_up(cpu, tidle);
 
-       /*
-        * We have to walk the irq descriptors to setup the vector
-        * space for the cpu which comes online.  Prevent irq
-        * alloc/free across the bringup.
-        */
-       irq_lock_sparse();
-
        err = do_boot_cpu(apicid, cpu, tidle);
-
        if (err) {
-               irq_unlock_sparse();
                pr_err("do_boot_cpu failed(%d) to wakeup CPU#%u\n", err, cpu);
                return -EIO;
        }
@@ -1136,8 +1127,6 @@ int native_cpu_up(unsigned int cpu, struct task_struct *tidle)
                touch_nmi_watchdog();
        }
 
-       irq_unlock_sparse();
-
        return 0;
 }
 
index 341bf80f80bd685d529db77f6c4afdeda05f28ae..ec12b726fa6f056dda3176055619fdf5ce06982a 100644 (file)
@@ -349,8 +349,16 @@ static int bringup_cpu(unsigned int cpu)
        struct task_struct *idle = idle_thread_get(cpu);
        int ret;
 
+       /*
+        * Some architectures have to walk the irq descriptors to
+        * setup the vector space for the cpu which comes online.
+        * Prevent irq alloc/free across the bringup.
+        */
+       irq_lock_sparse();
+
        /* Arch-specific enabling code. */
        ret = __cpu_up(cpu, idle);
+       irq_unlock_sparse();
        if (ret) {
                cpu_notify(CPU_UP_CANCELED, cpu);
                return ret;