1. 28 Sep, 2020 1 commit
  2. 23 Sep, 2020 2 commits
  3. 22 Sep, 2020 3 commits
  4. 21 Sep, 2020 4 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
    • Ulf Hansson's avatar
      cpuidle: psci: Fix suspicious RCU usage · 36050d89
      Ulf Hansson authored
      The commit eb1f0023 ("lockdep,trace: Expose tracepoints"), started to
      expose us for tracepoints. This lead to the following RCU splat on an ARM64
      Qcom board.
      
      [    5.529634] WARNING: suspicious RCU usage
      [    5.537307] sdhci-pltfm: SDHCI platform and OF driver helper
      [    5.541092] 5.9.0-rc3 #86 Not tainted
      [    5.541098] -----------------------------
      [    5.541105] ../include/trace/events/lock.h:37 suspicious rcu_dereference_check() usage!
      [    5.541110]
      [    5.541110] other info that might help us debug this:
      [    5.541110]
      [    5.541116]
      [    5.541116] rcu_scheduler_active = 2, debug_locks = 1
      [    5.541122] RCU used illegally from extended quiescent state!
      [    5.541129] no locks held by swapper/0/0.
      [    5.541134]
      [    5.541134] stack backtrace:
      [    5.541143] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.9.0-rc3 #86
      [    5.541149] Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT)
      [    5.541157] Call trace:
      [    5.568185] sdhci_msm 7864900.sdhci: Got CD GPIO
      [    5.574186]  dump_backtrace+0x0/0x1c8
      [    5.574206]  show_stack+0x14/0x20
      [    5.574229]  dump_stack+0xe8/0x154
      [    5.574250]  lockdep_rcu_suspicious+0xd4/0xf8
      [    5.574269]  lock_acquire+0x3f0/0x460
      [    5.574292]  _raw_spin_lock_irqsave+0x80/0xb0
      [    5.574314]  __pm_runtime_suspend+0x4c/0x188
      [    5.574341]  psci_enter_domain_idle_state+0x40/0xa0
      [    5.574362]  cpuidle_enter_state+0xc0/0x610
      [    5.646487]  cpuidle_enter+0x38/0x50
      [    5.650651]  call_cpuidle+0x18/0x40
      [    5.654467]  do_idle+0x228/0x278
      [    5.657678]  cpu_startup_entry+0x24/0x70
      [    5.661153]  rest_init+0x1a4/0x278
      [    5.665061]  arch_call_rest_init+0xc/0x14
      [    5.668272]  start_kernel+0x508/0x540
      
      Following the path in pm_runtime_put_sync_suspend() from
      psci_enter_domain_idle_state(), it seems like we end up using the RCU.
      Therefore, let's simply silence the splat by informing the RCU about it
      with RCU_NONIDLE.
      
      Note that, this is a temporary solution. Instead we should strive to avoid
      using RCU_NONIDLE (and similar), but rather push rcu_idle_enter|exit()
      further down, closer to the arch specific code. However, as the CPU PM
      notifiers are also using the RCU, additional rework is needed.
      Reported-by: default avatarNaresh Kamboju <naresh.kamboju@linaro.org>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      Acked-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      36050d89
    • Borislav Petkov's avatar
      rcu/tree: Export rcu_idle_{enter,exit} to modules · 3ad1c8ef
      Borislav Petkov authored
      Fix this link error:
      
        ERROR: modpost: "rcu_idle_enter" [drivers/acpi/processor.ko] undefined!
        ERROR: modpost: "rcu_idle_exit" [drivers/acpi/processor.ko] undefined!
      
      when CONFIG_ACPI_PROCESSOR is built as module. PeterZ says that in light
      of ARM needing those soon too, they should simply be exported.
      
      Fixes: 1fecfdbb ("ACPI: processor: Take over RCU-idle for C3-BM idle")
      Reported-by: default avatarSven Joachim <svenjoac@gmx.de>
      Suggested-by: default avatarPeter Zijlstra <peterz@infradead.org>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Reviewed-by: default avatarPaul E. McKenney <paulmckrcu@kernel.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      3ad1c8ef
  5. 20 Sep, 2020 20 commits
  6. 19 Sep, 2020 10 commits