[PATCH] Remove unused prepare_to_switch macro
[firefly-linux-kernel-4.4.55.git] / include / asm-m32r / system.h
index dcf619a0a0b03285fd55976f2b0a1fc3ec6c7e49..c5ab5da56d21acb42dfb4c18e5bbdd8151aa58f8 100644 (file)
  * `next' and `prev' should be struct task_struct, but it isn't always defined
  */
 
-#ifndef CONFIG_SMP
-#define prepare_to_switch()  do { } while(0)
-#endif /* not CONFIG_SMP */
-
 #define switch_to(prev, next, last)  do { \
        register unsigned long  arg0 __asm__ ("r0") = (unsigned long)prev; \
        register unsigned long  arg1 __asm__ ("r1") = (unsigned long)next; \
        last = __last; \
 } while(0)
 
+/*
+ * On SMP systems, when the scheduler does migration-cost autodetection,
+ * it needs a way to flush as much of the CPU's caches as possible.
+ *
+ * TODO: fill this in!
+ */
+static inline void sched_cacheflush(void)
+{
+}
+
 /* Interrupt Control */
 #if !defined(CONFIG_CHIP_M32102) && !defined(CONFIG_CHIP_M32104)
 #define local_irq_enable() \
@@ -229,7 +235,7 @@ __cmpxchg_u32(volatile unsigned int *p, unsigned int old, unsigned int new)
                "       bra     2f;             \n"
                 "       .fillinsn              \n"
                "1:"
-                       M32R_UNLOCK" %2, @%1;   \n"
+                       M32R_UNLOCK" %0, @%1;   \n"
                 "       .fillinsn              \n"
                "2:"
                        : "=&r" (retval)