svn commit: r184454 - in stable/7/sys: . amd64/amd64 i386/i386
Maxim Sobolev
sobomax at FreeBSD.org
Wed Oct 29 21:08:35 UTC 2008
Author: sobomax
Date: Wed Oct 29 21:08:34 2008
New Revision: 184454
URL: http://svn.freebsd.org/changeset/base/184454
Log:
MFC: don't panic when HZ value is below 32. This change may need a bit
of refinement later, as bde says that 4BSD expects stathz of 128, while
in this case stathz would be in the range 40-128.
Approved by: re (kib, kensmith)
Modified:
stable/7/sys/ (props changed)
stable/7/sys/amd64/amd64/local_apic.c
stable/7/sys/i386/i386/local_apic.c
Modified: stable/7/sys/amd64/amd64/local_apic.c
==============================================================================
--- stable/7/sys/amd64/amd64/local_apic.c Wed Oct 29 20:19:54 2008 (r184453)
+++ stable/7/sys/amd64/amd64/local_apic.c Wed Oct 29 21:08:34 2008 (r184454)
@@ -401,7 +401,10 @@ lapic_setup_clock(void)
lapic_timer_hz = hz * 2;
else
lapic_timer_hz = hz * 4;
- stathz = lapic_timer_hz / (lapic_timer_hz / 128);
+ if (lapic_timer_hz < 128)
+ stathz = lapic_timer_hz;
+ else
+ stathz = lapic_timer_hz / (lapic_timer_hz / 128);
profhz = lapic_timer_hz;
lapic_timer_period = value / lapic_timer_hz;
Modified: stable/7/sys/i386/i386/local_apic.c
==============================================================================
--- stable/7/sys/i386/i386/local_apic.c Wed Oct 29 20:19:54 2008 (r184453)
+++ stable/7/sys/i386/i386/local_apic.c Wed Oct 29 21:08:34 2008 (r184454)
@@ -403,7 +403,10 @@ lapic_setup_clock(void)
lapic_timer_hz = hz * 2;
else
lapic_timer_hz = hz * 4;
- stathz = lapic_timer_hz / (lapic_timer_hz / 128);
+ if (lapic_timer_hz < 128)
+ stathz = lapic_timer_hz;
+ else
+ stathz = lapic_timer_hz / (lapic_timer_hz / 128);
profhz = lapic_timer_hz;
lapic_timer_period = value / lapic_timer_hz;
More information about the svn-src-stable
mailing list