[PATCH 1/2][MIPS] replace inline assembler to cpu_wait()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Replace inline assembler to cpu_wait().

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@xxxxxxxxxxxxxx>

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();
 	}
 }
 


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux