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

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Sun Jul 21 2002 - 19:54:06 EST


On Sun, 2002-07-21 at 23:51, Russell King wrote:
> 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()

You still need the barrier() as well

-
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/



This archive was generated by hypermail 2b29 : Tue Jul 23 2002 - 22:00:36 EST