1. 06 Nov, 2019 1 commit
    • Rafael J. Wysocki's avatar
      cpuidle: Consolidate disabled state checks · 99e98d3f
      Rafael J. Wysocki authored
      There are two reasons why CPU idle states may be disabled: either
      because the driver has disabled them or because they have been
      disabled by user space via sysfs.
      
      In the former case, the state's "disabled" flag is set once during
      the initialization of the driver and it is never cleared later (it
      is read-only effectively).  In the latter case, the "disable" field
      of the given state's cpuidle_state_usage struct is set and it may be
      changed via sysfs.  Thus checking whether or not an idle state has
      been disabled involves reading these two flags every time.
      
      In order to avoid the additional check of the state's "disabled" flag
      (which is effectively read-only anyway), use the value of it at the
      init time to set a (new) flag in the "disable" field of that state's
      cpuidle_state_usage structure and use the sysfs interface to
      manipulate another (new) flag in it.  This way the state is disabled
      whenever the "disable" field of its cpuidle_state_usage structure is
      nonzero, whatever the reason, and it is the only place to look into
      to check whether or not the state has been disabled.
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      99e98d3f
  2. 25 Oct, 2019 1 commit
    • Yin Fengwei's avatar
      ACPI: processor_idle: Skip dummy wait if kernel is in guest · fa583f71
      Yin Fengwei authored
      In function acpi_idle_do_entry(), an ioport access is used for
      dummy wait to guarantee hardware behavior. But it could trigger
      unnecessary VMexit if kernel is running as guest in virtualization
      environment.
      
      If it's in virtualization environment, the deeper C state enter
      operation (inb()) will trap to hypervisor. It's not needed to do
      dummy wait after the inb() call. So we could just remove the
      dummy io port access to avoid unnecessary VMexit.
      
      And keep dummy io port access to maintain timing for native
      environment.
      Signed-off-by: default avatarYin Fengwei <fengwei.yin@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      fa583f71
  3. 24 Oct, 2019 2 commits
  4. 22 Oct, 2019 1 commit
  5. 20 Oct, 2019 6 commits
  6. 19 Oct, 2019 29 commits