[PATCH] fix heartbeat

STALE8943d

2 messages, 2 authors, 2002-02-09 · open the first message on its own page

[PATCH] fix heartbeat

From: Val Henson <hidden>
Date: 2002-02-09 01:46:10

The heartbeat function will not execute properly on Gemini without
this patch. (Check for cpu 0 removed from gemini_heartbeat.)

-VAL

diff -Nru a/arch/ppc/kernel/time.c b/arch/ppc/kernel/time.c
--- a/arch/ppc/kernel/time.c	Fri Feb  8 15:12:57 2002
+++ b/arch/ppc/kernel/time.c	Fri Feb  8 15:12:57 2002
@@ -208,7 +208,8 @@
 	smp_local_timer_interrupt(regs);
 #endif /* CONFIG_SMP */

-	if (ppc_md.heartbeat && !ppc_md.heartbeat_count--)
+	if (ppc_md.heartbeat && !smp_processor_id() &&
+	    !ppc_md.heartbeat_count--)
 		ppc_md.heartbeat();

 	hardirq_exit(cpu);
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: [PATCH] fix heartbeat

From: Paul Mackerras <hidden>
Date: 2002-02-09 06:50:47

Val Henson writes:
The heartbeat function will not execute properly on Gemini without
this patch. (Check for cpu 0 removed from gemini_heartbeat.)
CHRP needs the heartbeat function called on all cpus, IIRC.

Clearly the heartbeat_count needs to be per-cpu or else pushed into
the heartbeat function.  How about we make it just

	if (ppc_md.heartbeat)
		ppc_md.heartbeat();

and let the heartbeat function do the if (!smp_processor_id()) and the
if (!heartbeat_count--) if it wants?

Paul.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help