git: kernel - Refactor machdep.cpu_idle_hlt

Matthew Dillon dillon at
Sat Apr 28 18:35:50 PDT 2018

commit 704d2129313f4d074fc7fb551c19703110402702
Author: Matthew Dillon <dillon at>
Date:   Sat Apr 28 18:06:19 2018 -0700

    kernel - Refactor machdep.cpu_idle_hlt
    * Refactor machdep.cpu_idle_hlt.  Operation works essentially the
      same way as before but the code is a lot easier to read.
    * Refactor mode 3 to have ACPI call back into machdep when entering
      a C1 halt.  Continue using HLT for this situation as we aren't
      really sure what ACPI may or may not have done.  MONITOR/MWAIT
      might not be appropriate.
    * Fix bug in cpu_smp_stopped().  Just because cpu_mwait_hints is
      non-zero does not mean that there is an index entry for CPU_MWAIT_C1.
      Use the last entry based on cpu_mwait_hints instead.
    * Note that machdep.cpu_idle_hlt mode 2 still doesn't work as intended.

Summary of changes:
 sys/dev/acpica/acpi_cpu_cstate.c   |   6 +-
 sys/platform/pc64/x86_64/machdep.c | 231 ++++++++++++++++++++++++++-----------
 sys/sys/systm.h                    |   1 +
 3 files changed, 166 insertions(+), 72 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list