linux-mips
[Top] [All Lists]

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

To: Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH 1/2][MIPS] replace inline assembler to cpu_wait()
From: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Date: Fri, 11 Jul 2008 22:39:14 +0900
Cc: yoichi_yuasa@tripeaks.co.jp, linux-mips <linux-mips@linux-mips.org>
Organization: TriPeaks Corporation
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
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();
        }
 }
 

<Prev in Thread] Current Thread [Next in Thread>