Ralf Baechle
087d990b37
MIPS: Idle: Break r4k_wait into two functions and fix it.
...
local_irq_enable() may expand into very different code, so it rather should
stay in C. Also this keeps the assembler code size constant which keeps
the rollback code simple. So it's best to split r4k_wait into two parts,
one C and one assembler.
Finally add the local_irq_enable() to r4k_wait to ensure the WAIT
instruction in __r4k_wait() will work properly.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-05-22 01:34:28 +02:00
Ralf Baechle
bdc92d74e0
MIPS: Idle: Consolidate all declarations in <asm/idle.h>.
...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-05-22 01:34:27 +02:00
Ralf Baechle
d882f07a83
MIPS: Idle: Don't call local_irq_disable() in cpu_wait() implementations.
...
The generic idle loop has already disabled interrupts so this is redundant.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-05-22 01:34:27 +02:00
Ralf Baechle
fb40bc3e94
MIPS: Idle: Re-enable irqs at the end of r3081, au1k and loongson2 cpu_wait.
...
Without this, the
WARN_ON_ONCE(irqs_disabled());
in the idle loop will be triggered.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-05-22 01:34:26 +02:00
Ralf Baechle
c9b6869dbb
MIPS: Idle: Make call of function pointer readable.
...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-05-22 01:34:26 +02:00
Ralf Baechle
f91a148aa2
MIPS: Idle: Consistently reformat inline assembler.
...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-05-22 01:34:25 +02:00
Ralf Baechle
00baf8576c
MIPS: Idle: cleaup SMTC idle hook as per Linux coding style.
...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-05-22 01:34:25 +02:00
Ralf Baechle
49f2ec91e1
MIPS: Consolidate idle loop / WAIT instruction support in a single file.
...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-05-22 01:34:25 +02:00