diff options
author | Marius Strobl <marius@FreeBSD.org> | 2006-03-28 20:25:46 +0000 |
---|---|---|
committer | Marius Strobl <marius@FreeBSD.org> | 2006-03-28 20:25:46 +0000 |
commit | 20396fc1509001613727e96c6c68530b8bd18dc5 (patch) | |
tree | e2b7a05375d1a5d318f4d45363b0297979f18655 | |
parent | edff99cad1aeea7a4072384f801b9e4d1956c63f (diff) | |
download | src-20396fc1509001613727e96c6c68530b8bd18dc5.tar.gz src-20396fc1509001613727e96c6c68530b8bd18dc5.zip |
- 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
Notes
Notes:
svn path=/head/; revision=157226
-rw-r--r-- | sys/sparc64/sparc64/tick.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/sys/sparc64/sparc64/tick.c b/sys/sparc64/sparc64/tick.c index 61f3baef1f36..d246dca95d97 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); |