Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc/sparc call hardclock() the same way on cpu0 i...
details: https://anonhg.NetBSD.org/src/rev/6bdfd5baa440
branches: trunk
changeset: 762045:6bdfd5baa440
user: mrg <mrg%NetBSD.org@localhost>
date: Mon Feb 14 10:21:05 2011 +0000
description:
call hardclock() the same way on cpu0 in MP and !MP cases.
diffstat:
sys/arch/sparc/sparc/timer_sun4m.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (46 lines):
diff -r 3e2b7f86ced4 -r 6bdfd5baa440 sys/arch/sparc/sparc/timer_sun4m.c
--- a/sys/arch/sparc/sparc/timer_sun4m.c Mon Feb 14 10:20:31 2011 +0000
+++ b/sys/arch/sparc/sparc/timer_sun4m.c Mon Feb 14 10:21:05 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: timer_sun4m.c,v 1.23 2011/01/27 06:24:59 mrg Exp $ */
+/* $NetBSD: timer_sun4m.c,v 1.24 2011/02/14 10:21:05 mrg Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: timer_sun4m.c,v 1.23 2011/01/27 06:24:59 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: timer_sun4m.c,v 1.24 2011/02/14 10:21:05 mrg Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -106,7 +106,8 @@
* all CPUs. This function ends up being called on sun4m systems
* every tick.
*/
- hardclock(v);
+ if (!CPU_IS_PRIMARY(curcpu()))
+ hardclock(v);
/*
* The factor 8 is only valid for stathz==100.
@@ -125,6 +126,7 @@
clockintr_4m(void *cap)
{
+ KASSERT(CPU_IS_PRIMARY(curcpu()));
/*
* XXX this needs to be fixed in a more general way
* problem is that the kernel enables interrupts and THEN
@@ -141,9 +143,7 @@
/* read the limit register to clear the interrupt */
*((volatile int *)&timerreg4m->t_limit);
tickle_tc();
-#if !defined(MULTIPROCESSOR)
hardclock((struct clockframe *)cap);
-#endif
return (1);
}
Home |
Main Index |
Thread Index |
Old Index