]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branches 'sched/devel', 'sched/cpu-hotplug', 'sched/cpusets' and 'sched/urgent...
authorIngo Molnar <mingo@elte.hu>
Wed, 8 Oct 2008 09:31:02 +0000 (11:31 +0200)
committerIngo Molnar <mingo@elte.hu>
Wed, 8 Oct 2008 09:31:02 +0000 (11:31 +0200)
1  2  3  4 
arch/ia64/kernel/smpboot.c
kernel/cpu.c

index d8f05e504fbf039bb85fa946c40e6ff01349d26b,d8f05e504fbf039bb85fa946c40e6ff01349d26b,333b58f218d09633f45585892b6601479142f1d3,d8f05e504fbf039bb85fa946c40e6ff01349d26b..1dcbb85fc4ee9f05253d5d76b5e8033b39a07cf9
@@@@@ -401,6 -401,6 -401,7 -401,6 +401,7 @@@@@ smp_callin (void
        spin_lock(&vector_lock);
        /* Setup the per cpu irq handling data structures */
        __setup_vector_irq(cpuid);
++ +    notify_cpu_starting(cpuid);
        cpu_set(cpuid, cpu_online_map);
        per_cpu(cpu_state, cpuid) = CPU_ONLINE;
        spin_unlock(&vector_lock);
@@@@@ -741,14 -741,14 -742,16 -741,14 +742,14 @@@@@ int __cpu_disable(void
                        return -EBUSY;
        }
    
  -     cpu_clear(cpu, cpu_online_map);
  - 
        if (migrate_platform_irqs(cpu)) {
                cpu_set(cpu, cpu_online_map);
                return (-EBUSY);
        }
    
        remove_siblinginfo(cpu);
  -     cpu_clear(cpu, cpu_online_map);
        fixup_irqs();
  +     cpu_clear(cpu, cpu_online_map);
        local_flush_tlb_all();
        cpu_clear(cpu, cpu_callin_map);
        return 0;
diff --combined kernel/cpu.c
index f17e9854c24612e1e3f83b389f48224eb2d7b807,9e7ebde1331c4d100ff1696383cfed4f9d6e3f3b,dc45f2459efb4eef4140ca01ff26164b084c2e36,f17e9854c24612e1e3f83b389f48224eb2d7b807..86d49045daed050ee3e1c3d18a8d80d8b1793b85
@@@@@ -199,13 -199,14 -199,13 -199,13 +199,14 @@@@@ static int __ref take_cpu_down(void *_p
        struct take_cpu_down_param *param = _param;
        int err;
    
- --    raw_notifier_call_chain(&cpu_chain, CPU_DYING | param->mod,
- --                            param->hcpu);
        /* Ensure this CPU doesn't handle any more interrupts. */
        err = __cpu_disable();
        if (err < 0)
                return err;
    
+ ++    raw_notifier_call_chain(&cpu_chain, CPU_DYING | param->mod,
+ ++                            param->hcpu);
+ ++
        /* Force idle task to run as soon as we yield: it should
           immediately notice cpu is offline and die quickly. */
        sched_idle_next();
    }
    #endif /* CONFIG_PM_SLEEP_SMP */
    
++ +/**
++ + * notify_cpu_starting(cpu) - call the CPU_STARTING notifiers
++ + * @cpu: cpu that just started
++ + *
++ + * This function calls the cpu_chain notifiers with CPU_STARTING.
++ + * It must be called by the arch code on the new cpu, before the new cpu
++ + * enables interrupts and before the "boot" cpu returns from __cpu_up().
++ + */
++ +void notify_cpu_starting(unsigned int cpu)
++ +{
++ +    unsigned long val = CPU_STARTING;
++ +
++ +#ifdef CONFIG_PM_SLEEP_SMP
++ +    if (cpu_isset(cpu, frozen_cpus))
++ +            val = CPU_STARTING_FROZEN;
++ +#endif /* CONFIG_PM_SLEEP_SMP */
++ +    raw_notifier_call_chain(&cpu_chain, val, (void *)(long)cpu);
++ +}
++ +
    #endif /* CONFIG_SMP */
    
    /*