This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / include / asm-m32r / processor.h
index b2bdd45..24caabe 100644 (file)
@@ -1,23 +1,28 @@
 #ifndef _ASM_M32R_PROCESSOR_H
 #define _ASM_M32R_PROCESSOR_H
 
+/* $Id$ */
+
 /*
- * include/asm-m32r/processor.h
- *
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (C) 1994  Linus Torvalds
- * Copyright (C) 2001  Hiroyuki Kondo, Hirokazu Takata, and Hitoshi Yamamoto
- * Copyright (C) 2004  Hirokazu Takata <takata at linux-m32r.org>
+ * Copyright (C) 2001  by Hiroyuki Kondo, Hirokazu Takata, and Hitoshi Yamamoto
  */
 
+/*
+ * include/asm-m32r/processor.h
+ *
+ * Copyright (C) 1994 Linus Torvalds
+ */
 #include <linux/kernel.h>
 #include <linux/config.h>
 #include <asm/cache.h>
 #include <asm/ptrace.h>  /* pt_regs */
 
+#include <asm/cachectl.h>
+
 /*
  * Default implementation of macro that returns current
  * instruction pointer ("program counter").
@@ -48,7 +53,7 @@ extern struct cpuinfo_m32r boot_cpu_data;
 extern struct cpuinfo_m32r cpu_data[];
 #define current_cpu_data cpu_data[smp_processor_id()]
 #else
-#define cpu_data (&boot_cpu_data)
+#define cpu_data &boot_cpu_data
 #define current_cpu_data boot_cpu_data
 #endif
 
@@ -136,6 +141,17 @@ unsigned long get_wchan(struct task_struct *p);
 
 #define THREAD_SIZE (2*PAGE_SIZE)
 
-#define cpu_relax()    barrier()
+/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
+static __inline__ void rep_nop(void)
+{
+       __asm__ __volatile__(
+               "nop \n\t"
+               "nop \n\t"
+               :
+               :
+               : "memory");
+}
+
+#define cpu_relax()     rep_nop()
 
 #endif /* _ASM_M32R_PROCESSOR_H */