Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75444
b: refs/heads/master
c: 40d6a14
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt authored and Linus Torvalds committed Jan 14, 2008
1 parent ae1996a commit ca9af21
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a2a6c74d34c3ae9de6825767a30ab17f709b59ce
refs/heads/master: 40d6a146629b98d8e322b6f9332b182c7cbff3df
11 changes: 11 additions & 0 deletions trunk/arch/x86/kernel/process_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,10 @@ void cpu_idle(void)
}
}

static void do_nothing(void *unused)
{
}

void cpu_idle_wait(void)
{
unsigned int cpu, this_cpu = get_cpu();
Expand All @@ -228,6 +232,13 @@ void cpu_idle_wait(void)
cpu_clear(cpu, map);
}
cpus_and(map, map, cpu_online_map);
/*
* We waited 1 sec, if a CPU still did not call idle
* it may be because it is in idle and not waking up
* because it has nothing to do.
* Give all the remaining CPUS a kick.
*/
smp_call_function_mask(map, do_nothing, 0, 0);
} while (!cpus_empty(map));

set_cpus_allowed(current, tmp);
Expand Down
11 changes: 11 additions & 0 deletions trunk/arch/x86/kernel/process_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ static void poll_idle (void)
cpu_relax();
}

static void do_nothing(void *unused)
{
}

void cpu_idle_wait(void)
{
unsigned int cpu, this_cpu = get_cpu();
Expand All @@ -160,6 +164,13 @@ void cpu_idle_wait(void)
cpu_clear(cpu, map);
}
cpus_and(map, map, cpu_online_map);
/*
* We waited 1 sec, if a CPU still did not call idle
* it may be because it is in idle and not waking up
* because it has nothing to do.
* Give all the remaining CPUS a kick.
*/
smp_call_function_mask(map, do_nothing, 0, 0);
} while (!cpus_empty(map));

set_cpus_allowed(current, tmp);
Expand Down

0 comments on commit ca9af21

Please sign in to comment.