cputimer/intr: Move powersaving intr cputimer switching to kern_cputimer.c
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 1 Feb 2014 13:15:53 +0000 (21:15 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 1 Feb 2014 14:17:18 +0000 (22:17 +0800)
commite80ea40997deef845c8a8bec0a9dfb5640e567c1
tree87f7ab5aaadfd1532023b0e8ba9753f45fb85be2
parent4fb199c40ab4e2d73c1659e3f855353af466586f
cputimer/intr: Move powersaving intr cputimer switching to kern_cputimer.c

While I'm here fix several bugs:
- Don't take ERESTART as error
- Use serializer to protect the number of power saving request.  Using
  atomic_fetchadd_int is not enough here:
  The first power saving request could fail.  However, before its failure,
  other power saving request could be successful, since the intr cputimer
  switch is skipped.
sys/dev/acpica/acpi_cpu_cstate.c
sys/kern/kern_cputimer.c
sys/sys/systimer.h