1. 21 Sep, 2020 2 commits
    • Chen Yu's avatar
      ACPI: processor: Print more information when acpi_processor_evaluate_cst() fails · 653f68b6
      Chen Yu authored
      Some platforms have bogus _CST which might cause unexpectd behavior
      in the CPU idle driver. Some bogus _CST might be unable to be
      disassembled by acpica-tools due to broken format.
      
      Print extra log if the _CST extraction/verification failes.
      
      This can be used to help narrow down why the CPU idle driver fails
      to behave as expected.
      Suggested-by: default avatarZhang Rui <rui.zhang@intel.com>
      Signed-off-by: default avatarChen Yu <yu.c.chen@intel.com>
      [ rjw: Subject and changelog edits ]
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      653f68b6
    • Dmitry Osipenko's avatar
      cpuidle: tegra: Correctly handle result of arm_cpuidle_simple_enter() · 1170433e
      Dmitry Osipenko authored
      The enter() callback of CPUIDLE drivers returns index of the entered idle
      state on success or a negative value on failure. The negative value could
      any negative value, i.e. it doesn't necessarily needs to be a error code.
      That's because CPUIDLE core only cares about the fact of failure and not
      about the reason of the enter() failure.
      
      Like every other enter() callback, the arm_cpuidle_simple_enter() returns
      the entered idle-index on success. Unlike some of other drivers, it never
      fails. It happened that TEGRA_C1=index=err=0 in the code of cpuidle-tegra
      driver, and thus, there is no problem for the cpuidle-tegra driver created
      by the typo in the code which assumes that the arm_cpuidle_simple_enter()
      returns a error code.
      
      The arm_cpuidle_simple_enter() also may return a -ENODEV error if CPU_IDLE
      is disabled in a kernel's config, but all CPUIDLE drivers are disabled if
      CPU_IDLE is disabled, including the cpuidle-tegra driver. So we can't ever
      see the error code from arm_cpuidle_simple_enter() today.
      
      Of course the code may get some changes in the future and then the
      typo may transform into a real bug, so let's correct the typo! The
      tegra_cpuidle_state_enter() is now changed to make it return the entered
      idle-index on success and negative error code on fail, which puts it on
      par with the arm_cpuidle_simple_enter(), making code consistent in regards
      to the error handling.
      
      This patch fixes a minor typo in the code, it doesn't fix any bugs.
      Signed-off-by: default avatarDmitry Osipenko <digetx@gmail.com>
      Reviewed-by: default avatarJon Hunter <jonathanh@nvidia.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      1170433e
  2. 20 Sep, 2020 20 commits
  3. 19 Sep, 2020 18 commits