[MIPS] Reduce race between cpu_wait() and need_resched() checking
commit8fd45ca90f129fd7318a8914a33e998a3a60b031
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Wed, 7 Jun 2006 16:09:01 +0000 (8 01:09 +0900)
committerRalf Baechle <ralf@linux-mips.org>
Sun, 10 Sep 2006 00:06:22 +0000 (10 02:06 +0200)
tree19cd63fb4326e3b08b784ad8c6eba8a2d0b80a15
parent39823c1e4622cde51a7373bb32be1ccbc3feaead
[MIPS] Reduce race between cpu_wait() and need_resched() checking

If a thread became runnable between need_resched() and the WAIT
instruction, switching to the thread will delay until a next interrupt.
Some CPUs can execute the WAIT instruction with interrupt disabled, so
we can get rid of this race on them (at least UP case).

Original Patch by Atsushi with fixing up for MIPS Technology's cores by
Ralf based on feedback from the RTL designers.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/cpu-probe.c