lkml.org 
[lkml]   [2012]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 22/27] um, smpboot: Use generic SMP booting infrastructure
    Date
    From: Nikunj A. Dadhania <nikunj@linux.vnet.ibm.com>

    Convert um to use the generic framework to boot secondary CPUs.

    Notes:
    1. Removed call to default_idle() in idle_proc(). The generic framework will
    invoke cpu_idle().
    2. The generic code will call preempt_disable() and local_irq_enable() which
    weren't originally present in idle_proc().

    Signed-off-by: Nikunj A. Dadhania <nikunj@linux.vnet.ibm.com>
    Cc: Jeff Dike <jdike@addtoit.com>
    Cc: Richard Weinberger <richard@nod.at>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: Rusty Russell <rusty@rustcorp.com.au>
    Cc: Chris Metcalf <cmetcalf@tilera.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: user-mode-linux-devel@lists.sourceforge.net
    Cc: user-mode-linux-user@lists.sourceforge.net
    Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
    ---

    arch/um/kernel/smp.c | 12 +++++++-----
    1 files changed, 7 insertions(+), 5 deletions(-)

    diff --git a/arch/um/kernel/smp.c b/arch/um/kernel/smp.c
    index a02b7e9..6cffcf4 100644
    --- a/arch/um/kernel/smp.c
    +++ b/arch/um/kernel/smp.c
    @@ -10,6 +10,7 @@
    #ifdef CONFIG_SMP

    #include "linux/sched.h"
    +#include "linux/smpboot.h"
    #include "linux/module.h"
    #include "linux/threads.h"
    #include "linux/interrupt.h"
    @@ -58,6 +59,12 @@ static cpumask_t cpu_callin_map = CPU_MASK_NONE;

    static int idle_proc(void *cpup)
    {
    + smpboot_start_secondary(cpup);
    + return 0;
    +}
    +
    +void __cpuinit __cpu_pre_starting(void *unused)
    +{
    int cpu = (int) cpup, err;

    err = os_pipe(cpu_data[cpu].ipi_pipe, 1, 1);
    @@ -74,11 +81,6 @@ static int idle_proc(void *cpup)

    while (!cpu_isset(cpu, smp_commenced_mask))
    cpu_relax();
    -
    - notify_cpu_starting(cpu);
    - set_cpu_online(cpu, true);
    - default_idle();
    - return 0;
    }

    static struct task_struct *idle_thread(int cpu)


    \
     
     \ /
      Last update: 2012-06-01 13:01    [W:0.032 / U:30.908 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site