Skip to content

Commit

Permalink
x86: make stop_this_cpu looks exactly equal in both arches
Browse files Browse the repository at this point in the history
with the hlt_works change, it is possible to have i386
and x86_64 stop_this_cpu() looking exactly the same. They
can, after that, be merged.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Glauber Costa authored and Ingo Molnar committed Apr 17, 2008
1 parent 3d3f487 commit 3be5b49
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arch/x86/kernel/smp_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ static void stop_this_cpu (void * dummy)
*/
cpu_clear(smp_processor_id(), cpu_online_map);
disable_local_APIC();
if (cpu_data(smp_processor_id()).hlt_works_ok)
if (hlt_works(smp_processor_id()))
for(;;) halt();
for (;;);
}
Expand Down
5 changes: 3 additions & 2 deletions arch/x86/kernel/smp_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,9 @@ static void stop_this_cpu(void *dummy)
*/
cpu_clear(smp_processor_id(), cpu_online_map);
disable_local_APIC();
for (;;)
halt();
if (hlt_works(smp_processor_id()))
for (;;) halt();
for (;;);
}

void smp_send_stop(void)
Expand Down

0 comments on commit 3be5b49

Please sign in to comment.