[PATCH] Alan says this needs fixing... (timer/cpu_relax)

Russell King (rmk@arm.linux.org.uk)
Sun, 21 Jul 2002 23:51:54 +0100


While looking at some stuff, I noticed the following. Alan confirmed
that this patch is probably a good idea...

--- orig/kernel/timer.c Sun Jul 7 23:21:28 2002
+++ linux/kernel/timer.c Sun Jul 21 23:50:17 2002
@@ -176,7 +176,7 @@
#define timer_enter(t) do { running_timer = t; mb(); } while (0)
#define timer_exit() do { running_timer = NULL; } while (0)
#define timer_is_running(t) (running_timer == t)
-#define timer_synchronize(t) while (timer_is_running(t)) barrier()
+#define timer_synchronize(t) while (timer_is_running(t)) cpu_relax()
#else
#define timer_enter(t) do { } while (0)
#define timer_exit() do { } while (0)

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/