]> Git Repo - J-linux.git/commitdiff
Merge tag 'pm-5.20-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
authorLinus Torvalds <[email protected]>
Mon, 8 Aug 2022 21:29:00 +0000 (14:29 -0700)
committerLinus Torvalds <[email protected]>
Mon, 8 Aug 2022 21:29:00 +0000 (14:29 -0700)
Pull more power management updates from Rafael Wysocki:
 "These are ARM cpufreq updates and operating performance points (OPP)
  updates plus one cpuidle update adding a new trace point.

  Specifics:

   - Fix return error code in mtk_cpu_dvfs_info_init (Yang Yingliang).

   - Minor cleanups and support for new boards for Qcom cpufreq drivers
     (Bryan O'Donoghue, Konrad Dybcio, Pierre Gondois, and Yicong Yang).

   - Fix sparse warnings for Tegra cpufreq driver (Viresh Kumar).

   - Make dev_pm_opp_set_regulators() accept NULL terminated list
     (Viresh Kumar).

   - Add dev_pm_opp_set_config() and friends and migrate other users and
     helpers to using them (Viresh Kumar).

   - Add support for multiple clocks for a device (Viresh Kumar and
     Krzysztof Kozlowski).

   - Configure resources before adding OPP table for Venus (Stanimir
     Varbanov).

   - Keep reference count up for opp->np and opp_table->np while they
     are still in use (Liang He).

   - Minor OPP cleanups (Viresh Kumar and Yang Li).

   - Add a trace event for cpuidle to track missed (too deep or too
     shallow) wakeups (Kajetan Puchalski)"

* tag 'pm-5.20-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (55 commits)
  cpuidle: Add cpu_idle_miss trace event
  venus: pm_helpers: Fix warning in OPP during probe
  OPP: Don't drop opp->np reference while it is still in use
  OPP: Don't drop opp_table->np reference while it is still in use
  cpufreq: tegra194: Staticize struct tegra_cpufreq_soc instances
  dt-bindings: cpufreq: cpufreq-qcom-hw: Add SM6375 compatible
  dt-bindings: opp: Add msm8939 to the compatible list
  dt-bindings: opp: Add missing compat devices
  dt-bindings: opp: opp-v2-kryo-cpu: Fix example binding checks
  cpufreq: Change order of online() CB and policy->cpus modification
  cpufreq: qcom-hw: Remove deprecated irq_set_affinity_hint() call
  cpufreq: qcom-hw: Disable LMH irq when disabling policy
  cpufreq: qcom-hw: Reset cancel_throttle when policy is re-enabled
  cpufreq: qcom-cpufreq-hw: use HZ_PER_KHZ macro in units.h
  cpufreq: mediatek: fix error return code in mtk_cpu_dvfs_info_init()
  OPP: Remove dev{m}_pm_opp_of_add_table_noclk()
  PM / devfreq: tegra30: Register config_clks helper
  OPP: Allow config_clks helper for single clk case
  OPP: Provide a simple implementation to configure multiple clocks
  OPP: Assert clk_count == 1 for single clk helpers
  ...

1  2 
drivers/cpuidle/cpuidle.c
drivers/gpu/drm/panfrost/panfrost_drv.c

index 62dd956025f333ed5a014125f83ed64049b7c1fd,bf57cab3245616fd52cc237f79e8ce18500853b7..6eceb198824301962fc5c279234390cc3285b5a0
@@@ -8,6 -8,7 +8,7 @@@
   * This code is licenced under the GPL.
   */
  
+ #include "linux/percpu-defs.h"
  #include <linux/clockchips.h>
  #include <linux/kernel.h>
  #include <linux/mutex.h>
@@@ -23,7 -24,6 +24,7 @@@
  #include <linux/suspend.h>
  #include <linux/tick.h>
  #include <linux/mmu_context.h>
 +#include <linux/context_tracking.h>
  #include <trace/events/power.h>
  
  #include "cpuidle.h"
@@@ -151,12 -151,12 +152,12 @@@ static void enter_s2idle_proper(struct 
         */
        stop_critical_timings();
        if (!(target_state->flags & CPUIDLE_FLAG_RCU_IDLE))
 -              rcu_idle_enter();
 +              ct_idle_enter();
        target_state->enter_s2idle(dev, drv, index);
        if (WARN_ON_ONCE(!irqs_disabled()))
                local_irq_disable();
        if (!(target_state->flags & CPUIDLE_FLAG_RCU_IDLE))
 -              rcu_idle_exit();
 +              ct_idle_exit();
        tick_unfreeze();
        start_critical_timings();
  
@@@ -234,10 -234,10 +235,10 @@@ int cpuidle_enter_state(struct cpuidle_
  
        stop_critical_timings();
        if (!(target_state->flags & CPUIDLE_FLAG_RCU_IDLE))
 -              rcu_idle_enter();
 +              ct_idle_enter();
        entered_state = target_state->enter(dev, drv, index);
        if (!(target_state->flags & CPUIDLE_FLAG_RCU_IDLE))
 -              rcu_idle_exit();
 +              ct_idle_exit();
        start_critical_timings();
  
        sched_clock_idle_wakeup_event();
  
                                /* Shallower states are enabled, so update. */
                                dev->states_usage[entered_state].above++;
+                               trace_cpu_idle_miss(dev->cpu, entered_state, false);
                                break;
                        }
                } else if (diff > delay) {
                                 * Update if a deeper state would have been a
                                 * better match for the observed idle duration.
                                 */
-                               if (diff - delay >= drv->states[i].target_residency_ns)
+                               if (diff - delay >= drv->states[i].target_residency_ns) {
                                        dev->states_usage[entered_state].below++;
+                                       trace_cpu_idle_miss(dev->cpu, entered_state, true);
+                               }
  
                                break;
                        }
index 2d870cf73b0764c61116ba13cabc8d8e96335042,f08b6c1b86a1a3ff95fd143f3808d3519a6c12c2..2fa5afe21288929e2a479c4f61f94a441a253cee
@@@ -626,24 -626,29 +626,29 @@@ static int panfrost_remove(struct platf
        return 0;
  }
  
- static const char * const default_supplies[] = { "mali" };
+ /*
+  * The OPP core wants the supply names to be NULL terminated, but we need the
+  * correct num_supplies value for regulator core. Hence, we NULL terminate here
+  * and then initialize num_supplies with ARRAY_SIZE - 1.
+  */
+ static const char * const default_supplies[] = { "mali", NULL };
  static const struct panfrost_compatible default_data = {
-       .num_supplies = ARRAY_SIZE(default_supplies),
+       .num_supplies = ARRAY_SIZE(default_supplies) - 1,
        .supply_names = default_supplies,
        .num_pm_domains = 1, /* optional */
        .pm_domain_names = NULL,
  };
  
  static const struct panfrost_compatible amlogic_data = {
-       .num_supplies = ARRAY_SIZE(default_supplies),
+       .num_supplies = ARRAY_SIZE(default_supplies) - 1,
        .supply_names = default_supplies,
        .vendor_quirk = panfrost_gpu_amlogic_quirk,
  };
  
- static const char * const mediatek_mt8183_supplies[] = { "mali", "sram" };
+ static const char * const mediatek_mt8183_supplies[] = { "mali", "sram", NULL };
  static const char * const mediatek_mt8183_pm_domains[] = { "core0", "core1", "core2" };
  static const struct panfrost_compatible mediatek_mt8183_data = {
-       .num_supplies = ARRAY_SIZE(mediatek_mt8183_supplies),
+       .num_supplies = ARRAY_SIZE(mediatek_mt8183_supplies) - 1,
        .supply_names = mediatek_mt8183_supplies,
        .num_pm_domains = ARRAY_SIZE(mediatek_mt8183_pm_domains),
        .pm_domain_names = mediatek_mt8183_pm_domains,
@@@ -665,7 -670,6 +670,7 @@@ static const struct of_device_id dt_mat
        { .compatible = "arm,mali-t860", .data = &default_data, },
        { .compatible = "arm,mali-t880", .data = &default_data, },
        { .compatible = "arm,mali-bifrost", .data = &default_data, },
 +      { .compatible = "arm,mali-valhall-jm", .data = &default_data, },
        { .compatible = "mediatek,mt8183-mali", .data = &mediatek_mt8183_data },
        {}
  };
This page took 0.076361 seconds and 4 git commands to generate.