diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2012-11-13 19:21:20 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2012-11-13 19:21:20 +0000 |
commit | 3f7b39e7c5d75a0a9209cc3f2002bddfa434b648 (patch) | |
tree | 9c54f82d65a5c501d2ca792d266c3dbbcdf91595 /sys | |
parent | 457f60a384f697fba70d880d5969df005ddbfaa6 (diff) |
Do not advance the timecounter too fast on MULTIPROCESSOR kernels; noticed
and ok aoyama@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/luna88k/luna88k/clock.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/arch/luna88k/luna88k/clock.c b/sys/arch/luna88k/luna88k/clock.c index a06cdb70d70..56f2dbfff42 100644 --- a/sys/arch/luna88k/luna88k/clock.c +++ b/sys/arch/luna88k/luna88k/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.8 2012/10/18 17:45:08 miod Exp $ */ +/* $OpenBSD: clock.c,v 1.9 2012/11/13 19:21:19 miod Exp $ */ /* $NetBSD: clock.c,v 1.2 2000/01/11 10:29:35 nisimura Exp $ */ /* @@ -221,9 +221,17 @@ int clockintr(void *eframe) { extern unsigned int *clock_reg[]; - int cpu = cpu_number(); +#ifdef MULTIPROCESSOR + struct cpu_info *ci = curcpu(); + u_int cpu = ci->ci_cpuid; +#else + u_int cpu = cpu_number(); +#endif - clockevc->ec_count++; +#ifdef MULTIPROCESSOR + if (CPU_IS_PRIMARY(ci)) +#endif + clockevc->ec_count++; *clock_reg[cpu] = 0xffffffff; if (clockinitted) |