7bed9b320b
SpitFire erratum #54) which can cause writes to the TICK_CMPR register to fail. This seems to fix the dying clocks problem reported by jhb@ and kris@. [1] - In tick_start() don't reset the tick counter of the boot processor to zero. It's initially reset in _start() and afterwards but _before_ tick_start() is called on the BSP the APs synchronise with the tick counter of the BSP in mp_startup(). Resetting the tick counter of the BSP in tick_start() probably also was the cause of problems seen when using the CPU tick counter as timecounter on SMP machines. Not resetting the tick counter of the BSP in mp_startup() makes the tick counters and tick interrupts between the BSP and APs be pretty much in sync as it's supposed to be. This also means there's no longer a real reason to have separate tick_start() and tick_start_ap() so merge them and zap tick_start_ap(). This is also a first step in simplifying the interface to the tick counters in preparation to use alternate clock hardware where available. - Switch to the algorithm used on FreeBSD/ia64 for updating the tick interrupt register and which compensates the clock drift caused by varying delays between when the tick interrupts actually trigger and when they are serviced. Not compensating the clock drift mainly hurts interactive performance especially when using WITNESS. [2] For further information about the algorithm also see the commit log of sys/ia64/ia64/interrupt.c rev. 1.38. On sparc64 the sysctls for monitoring the behaviour of the tick interrupts are machdep.tick.adjust_edges, machdep.tick.adjust_excess, machdep.tick.adjust_missed and machdep.tick.adjust_ticks. - In tick_init() just use tick_stop() for stopping the tick interrupts until a proper handler is set up later. This also stops the system tick interrupt on USIII systems earlier. - In tick_start() check for a rough upper limit of HZ. - Some minor changes, e.g. use FBSDID, remove unused headers, etc. Info obtained from: Linux [1] Ok'ed by: marcel [2] Additional testing by: kris (earlier version of the workaround), jhb X-MFC after: 3 days [1] |
||
---|---|---|
.. | ||
_inttypes.h | ||
_limits.h | ||
_stdint.h | ||
_types.h | ||
asi.h | ||
asm.h | ||
asmacros.h | ||
atomic.h | ||
bus_common.h | ||
bus_dma.h | ||
bus_memio.h | ||
bus_pio.h | ||
bus_private.h | ||
bus.h | ||
cache.h | ||
ccr.h | ||
clock.h | ||
cpu.h | ||
cpufunc.h | ||
db_machdep.h | ||
eeprom.h | ||
elf.h | ||
endian.h | ||
exec.h | ||
float.h | ||
floatingpoint.h | ||
fp.h | ||
frame.h | ||
fsr.h | ||
gdb_machdep.h | ||
idprom.h | ||
ieee.h | ||
ieeefp.h | ||
in_cksum.h | ||
instr.h | ||
intr_machdep.h | ||
iommureg.h | ||
iommuvar.h | ||
kdb.h | ||
kerneldump.h | ||
ktr.h | ||
limits.h | ||
lsu.h | ||
md_var.h | ||
memdev.h | ||
metadata.h | ||
mutex.h | ||
nexusvar.h | ||
ofw_bus.h | ||
ofw_machdep.h | ||
ofw_mem.h | ||
ofw_nexus.h | ||
ofw_upa.h | ||
param.h | ||
pcb.h | ||
pcpu.h | ||
pmap.h | ||
proc.h | ||
profile.h | ||
pstate.h | ||
ptrace.h | ||
reg.h | ||
reloc.h | ||
resource.h | ||
runq.h | ||
sc_machdep.h | ||
setjmp.h | ||
sf_buf.h | ||
sigframe.h | ||
signal.h | ||
smp.h | ||
stdarg.h | ||
sysarch.h | ||
tick.h | ||
tlb.h | ||
trap.h | ||
tsb.h | ||
tstate.h | ||
tte.h | ||
ucontext.h | ||
upa.h | ||
utrap.h | ||
varargs.h | ||
ver.h | ||
vmparam.h | ||
watch.h | ||
wstate.h |