Allow one shot timer to be switched on a running system between i8254 and
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 3 May 2009 07:36:56 +0000 (15:36 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 3 May 2009 11:22:47 +0000 (19:22 +0800)
commit76c58571c167a68b12478dcff753f0a639e381da
tree46b36f6b747596999dae95a689f82c31df0fbc7c
parent136cd2197fb038f48ab1bb473988f6e0115db04f
Allow one shot timer to be switched on a running system between i8254 and
lapic timer:

- Always register "clk" interrupt.
- Add cputimer_intr_switch(), which could switch one shot timer between
  i8254 and lapic timer on a running system.  It could be used to select
  a proper one shot timer duing ACPI C3 transition:
  e.g. ->C3 use i8254, C3-> use lapic timer
- Add sysctl node hw.cputimer_intr_type to test cputimer_intr_switch().
sys/platform/pc32/apic/mpapic.c
sys/platform/pc32/isa/clock.c
sys/platform/pc64/isa/clock.c
sys/platform/vkernel/platform/systimer.c
sys/sys/systimer.h