Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38016
b: refs/heads/master
c: 5c1e176
h: refs/heads/master
v: v3
  • Loading branch information
Nick Piggin authored and Linus Torvalds committed Oct 3, 2006
1 parent c46ec45 commit 5571395
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2c136efcf6f58d07512c4df83eb494597fe0d229
refs/heads/master: 5c1e176781f43bc902a51e5832f789756bff911b
13 changes: 11 additions & 2 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -4817,7 +4817,7 @@ void show_state(void)
* NOTE: this function does not set the idle thread's NEED_RESCHED
* flag, to make booting more robust.
*/
void __devinit init_idle(struct task_struct *idle, int cpu)
void __cpuinit init_idle(struct task_struct *idle, int cpu)
{
struct rq *rq = cpu_rq(cpu);
unsigned long flags;
Expand Down Expand Up @@ -5461,7 +5461,7 @@ static void cpu_attach_domain(struct sched_domain *sd, int cpu)
}

/* cpus with isolated domains */
static cpumask_t __devinitdata cpu_isolated_map = CPU_MASK_NONE;
static cpumask_t __cpuinitdata cpu_isolated_map = CPU_MASK_NONE;

/* Setup the mask of cpus configured for isolated domains */
static int __init isolated_cpu_setup(char *str)
Expand Down Expand Up @@ -6747,11 +6747,20 @@ static int update_sched_domains(struct notifier_block *nfb,

void __init sched_init_smp(void)
{
cpumask_t non_isolated_cpus;

lock_cpu_hotplug();
arch_init_sched_domains(&cpu_online_map);
cpus_andnot(non_isolated_cpus, cpu_online_map, cpu_isolated_map);
if (cpus_empty(non_isolated_cpus))
cpu_set(smp_processor_id(), non_isolated_cpus);
unlock_cpu_hotplug();
/* XXX: Theoretical race here - CPU may be hotplugged now */
hotcpu_notifier(update_sched_domains, 0);

/* Move init over to a non-isolated CPU */
if (set_cpus_allowed(current, non_isolated_cpus) < 0)
BUG();
}
#else
void __init sched_init_smp(void)
Expand Down

0 comments on commit 5571395

Please sign in to comment.