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>
diff --git a/arch/mips/kernel/idle.c b/arch/mips/kernel/idle.c
index 985cc02..3b09b88 100644
--- a/arch/mips/kernel/idle.c
+++ b/arch/mips/kernel/idle.c
@@ -45,6 +45,12 @@
 	local_irq_enable();
 }
 
+void r4k_wait(void)
+{
+	local_irq_enable();
+	__r4k_wait();
+}
+
 /*
  * This variant is preferable as it allows testing need_resched and going to
  * sleep depending on the outcome atomically.  Unfortunately the "It is