diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2013-05-21 11:33:32 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-05-21 19:34:28 -0400 |
commit | 087d990b371c59edbfc119600e2d2eda18366292 (patch) | |
tree | 43869914c4a0680a7b560576f7169c80354138f3 /arch/mips/kernel/idle.c | |
parent | f94d9a8ef9aebab5317d11fb1633ba14ad240983 (diff) |
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>
Diffstat (limited to 'arch/mips/kernel/idle.c')
-rw-r--r-- | arch/mips/kernel/idle.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/mips/kernel/idle.c b/arch/mips/kernel/idle.c index 985cc02786e3..3b09b888afa9 100644 --- a/arch/mips/kernel/idle.c +++ b/arch/mips/kernel/idle.c | |||
@@ -45,6 +45,12 @@ static void r39xx_wait(void) | |||
45 | local_irq_enable(); | 45 | local_irq_enable(); |
46 | } | 46 | } |
47 | 47 | ||
48 | void r4k_wait(void) | ||
49 | { | ||
50 | local_irq_enable(); | ||
51 | __r4k_wait(); | ||
52 | } | ||
53 | |||
48 | /* | 54 | /* |
49 | * This variant is preferable as it allows testing need_resched and going to | 55 | * This variant is preferable as it allows testing need_resched and going to |
50 | * sleep depending on the outcome atomically. Unfortunately the "It is | 56 | * sleep depending on the outcome atomically. Unfortunately the "It is |