public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Alan says this needs fixing... (timer/cpu_relax)
@ 2002-07-21 22:51 Russell King
  2002-07-22  0:54 ` Alan Cox
  0 siblings, 1 reply; 2+ messages in thread
From: Russell King @ 2002-07-21 22:51 UTC (permalink / raw)
  To: linux-kernel

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Alan says this needs fixing... (timer/cpu_relax)
  2002-07-21 22:51 [PATCH] Alan says this needs fixing... (timer/cpu_relax) Russell King
@ 2002-07-22  0:54 ` Alan Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2002-07-22  0:54 UTC (permalink / raw)
  To: Russell King; +Cc: linux-kernel

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-07-21 23:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-21 22:51 [PATCH] Alan says this needs fixing... (timer/cpu_relax) Russell King
2002-07-22  0:54 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox