1. 01 9月, 2015 1 次提交
    • P
      cpufreq: mediatek: Add MT8173 cpufreq driver · 1453863f
      Pi-Cheng Chen 提交于
      Mediatek MT8173 is an ARMv8 based quad-core (2*Cortex-A53 and
      2*Cortex-A72) SoC with duall clusters. For each cluster, two voltage
      inputs, Vproc and Vsram are supplied by two regulators. For the big
      cluster, two regulators come from different PMICs. In this case, when
      scaling voltage inputs of the cluster, the voltages of two regulator
      inputs need to be controlled by software explicitly under the SoC
      specific limitation:
      
      	100mV < Vsram - Vproc < 200mV
      
      which is called 'voltage tracking' mechanism. And when scaling the
      frequency of cluster clock input, the input MUX need to be parented to
      another "intermediate" stable PLL first and reparented to the original
      PLL once the original PLL is stable at the target frequency. This patch
      implements those mechanisms to enable CPU DVFS support for Mediatek
      MT8173 SoC.
      Signed-off-by: NPi-Cheng Chen <pi-cheng.chen@linaro.org>
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      1453863f
  2. 07 8月, 2015 2 次提交
  3. 01 8月, 2015 5 次提交
  4. 28 7月, 2015 12 次提交
  5. 27 7月, 2015 1 次提交
  6. 25 7月, 2015 1 次提交
    • S
      cpufreq: Remove cpufreq_rwsem · 454d3a25
      Sebastian Andrzej Siewior 提交于
      cpufreq_rwsem was introduced in commit 6eed9404 ("cpufreq: Use
      rwsem for protecting critical sections) in order to replace
      try_module_get() on the cpu-freq driver. That try_module_get() worked
      well until the refcount was so heavily used that module removal became
      more or less impossible.
      
      Though when looking at the various (undocumented) protection
      mechanisms in that code, the randomly sprinkeled around cpufreq_rwsem
      locking sites are superfluous.
      
      The policy, which is acquired in cpufreq_cpu_get() and released in
      cpufreq_cpu_put() is sufficiently protected already.
      
        cpufreq_cpu_get(cpu)
          /* Protects against concurrent driver removal */
          read_lock_irqsave(&cpufreq_driver_lock, flags);
          policy = per_cpu(cpufreq_cpu_data, cpu);
          kobject_get(&policy->kobj);
          read_unlock_irqrestore(&cpufreq_driver_lock, flags);
      
      The reference on the policy serializes versus module unload already:
      
        cpufreq_unregister_driver()
          subsys_interface_unregister()
            __cpufreq_remove_dev_finish()
              per_cpu(cpufreq_cpu_data) = NULL;
      	cpufreq_policy_put_kobj()
      
      If there is a reference held on the policy, i.e. obtained prior to the
      unregister call, then cpufreq_policy_put_kobj() will wait until that
      reference is dropped. So once subsys_interface_unregister() returns
      there is no policy pointer in flight and no new reference can be
      obtained. So that rwsem protection is useless.
      
      The other usage of cpufreq_rwsem in show()/store() of the sysfs
      interface is redundant as well because sysfs already does the proper
      kobject_get()/put() pairs.
      
      That leaves CPU hotplug versus module removal. The current
      down_write() around the write_lock() in cpufreq_unregister_driver() is
      silly at best as it protects actually nothing.
      
      The trivial solution to this is to prevent hotplug across
      cpufreq_unregister_driver completely.
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      454d3a25
  7. 23 7月, 2015 5 次提交
  8. 21 7月, 2015 5 次提交
  9. 18 7月, 2015 5 次提交
  10. 17 7月, 2015 3 次提交