Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH 1/2][MIPS] replace inline assembler to cpu_wait()
@ 2008-07-11 13:39 Yoichi Yuasa
  2008-07-11 14:04 ` Ralf Baechle
  0 siblings, 1 reply; 2+ messages in thread
From: Yoichi Yuasa @ 2008-07-11 13:39 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: yoichi_yuasa, linux-mips

Replace inline assembler to cpu_wait().

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>

diff -pruN -X /home/yuasa/Memo/dontdiff linux-orig/arch/mips/gt64120/wrppmc/reset.c linux/arch/mips/gt64120/wrppmc/reset.c
--- linux-orig/arch/mips/gt64120/wrppmc/reset.c	2008-07-08 10:12:29.899943226 +0900
+++ linux/arch/mips/gt64120/wrppmc/reset.c	2008-07-08 13:32:37.836100230 +0900
@@ -5,10 +5,12 @@
  *
  * Copyright (C) 1997 Ralf Baechle
  */
+#include <linux/irqflags.h>
 #include <linux/kernel.h>
 
 #include <asm/cacheflush.h>
 #include <asm/mipsregs.h>
+#include <asm/processor.h>
 
 void wrppmc_machine_restart(char *command)
 {
@@ -32,11 +34,8 @@ void wrppmc_machine_halt(void)
 
 	printk(KERN_NOTICE "You can safely turn off the power\n");
 	while (1) {
-		__asm__(
-			".set\tmips3\n\t"
-			"wait\n\t"
-			".set\tmips0"
-		);
+		if (cpu_wait)
+			cpu_wait();
 	}
 }
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-07-11 17:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-11 13:39 [PATCH 1/2][MIPS] replace inline assembler to cpu_wait() Yoichi Yuasa
2008-07-11 14:04 ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox