mwait/spin: Push sysctl into machdep code
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 6 Feb 2014 11:56:59 +0000 (19:56 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 6 Feb 2014 12:39:59 +0000 (20:39 +0800)
commit6c2af113692ff4c3c4d20594bb7a5b41bdc050cc
treea502189477088ed2a9a3d3ae644e211c925cc1c3
parent765f099124642e25f9520815c5e6a0214bde6d97
mwait/spin: Push sysctl into machdep code

On x86_64, make the sysctl read only.  Sysctl machdep.mwait.CX.spin
should be used to configure the mwait hint.

Manipulate mwait hint value directly through hw.cpu_mwait_halt is not
safe, e.g. intr cputimer may need change for deep cpu specific C-state.
sys/kern/lwkt_thread.c
sys/platform/pc32/i386/machdep.c
sys/platform/pc64/x86_64/machdep.c