summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2006-03-28 20:25:46 +0000
committermarius <marius@FreeBSD.org>2006-03-28 20:25:46 +0000
commitd6a3e171f0206d5499e10efc06a8406d33ac5803 (patch)
treee2b7a05375d1a5d318f4d45363b0297979f18655 /sys/sparc64
parente3b3837a25b5683ddf9951df7a1b6de09b0d355e (diff)
downloadFreeBSD-src-d6a3e171f0206d5499e10efc06a8406d33ac5803.zip
FreeBSD-src-d6a3e171f0206d5499e10efc06a8406d33ac5803.tar.gz
- Move the check for too high HZ values from tick_init() to tick_start()
as we have to call tick_init() before cninit() in order to provide the low-level console drivers with a working DELAY() which in turn means we cannot use panic() in tick_init(). - s,to high, too high, in the panic string Inspired by: kmacy's sun4v changes MFC after: 3 days
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/sparc64/tick.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/sys/sparc64/sparc64/tick.c b/sys/sparc64/sparc64/tick.c
index 61f3bae..d246dca 100644
--- a/sys/sparc64/sparc64/tick.c
+++ b/sys/sparc64/sparc64/tick.c
@@ -146,13 +146,6 @@ tick_init(u_long clock)
tick_freq = clock;
tick_MHz = clock / 1000000;
tick_increment = clock / hz;
- /*
- * Avoid stopping of hardclock in terms of a lost tick interrupt
- * by ensuring that the tick period is at least TICK_GRACE ticks.
- */
- if (tick_increment < TICK_GRACE)
- panic("%s: HZ to high, decrease to at least %ld", __func__,
- clock / TICK_GRACE);
/*
* UltraSparc II[e,i] based systems come up with the tick interrupt
@@ -172,6 +165,18 @@ tick_start(void)
{
u_long base, s;
+ /*
+ * Avoid stopping of hardclock in terms of a lost tick interrupt
+ * by ensuring that the tick period is at least TICK_GRACE ticks.
+ * This check would be better placed in tick_init(), however we
+ * have to call tick_init() before cninit() in order to provide
+ * the low-level console drivers with a working DELAY() which in
+ * turn means we cannot use panic() in tick_init().
+ */
+ if (tick_increment < TICK_GRACE)
+ panic("%s: HZ too high, decrease to at least %ld", __func__,
+ tick_freq / TICK_GRACE);
+
if (PCPU_GET(cpuid) == 0)
intr_setup(PIL_TICK, tick_hardclock, -1, NULL, NULL);
OpenPOWER on IntegriCloud