freebsd-skq/sys/sparc64
marius fe74973b39 - Add a workaround for a bug in BlackBird CPUs (said to be part of the
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]
2005-04-16 14:57:38 +00:00
..
central - Add a device interface method for bus_get_resource_list() and use 2005-03-19 00:47:02 +00:00
compile
conf Add USB Communication Device Class Ethernet driver. Originally written for 2005-03-22 14:52:40 +00:00
creator - Add missing <sys/module.h>. [1] 2004-07-09 23:12:22 +00:00
ebus Don't panic when we're asked to allocate a resource type that we know 2005-01-09 18:58:08 +00:00
fhc Add a driver for the 'clock-board' device (the clock board is an 2005-03-19 01:04:48 +00:00
include - Add a workaround for a bug in BlackBird CPUs (said to be part of the 2005-04-16 14:57:38 +00:00
isa Since we are quite unlikely to ever face another platform which 2005-02-06 13:46:39 +00:00
pci fix kldloading of pci driver modules after boot on sparc64... since 2005-03-23 18:16:26 +00:00
sbus /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
sparc64 - Add a workaround for a bug in BlackBird CPUs (said to be part of the 2005-04-16 14:57:38 +00:00