]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
cpufreq: Update Documentation for cpus and related_cpus
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 31 Jan 2013 02:03:53 +0000 (02:03 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 1 Feb 2013 23:01:16 +0000 (00:01 +0100)
Documentation related to cpus and related_cpus is confusing and not very clear.
Over that CPUFreq core has seen much changes recently. Lets update documentation
and comments for cpus and related_cpus.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Documentation/cpu-freq/cpu-drivers.txt
Documentation/cpu-freq/user-guide.txt
include/linux/cpufreq.h

index c436096351f84ce15d13f02fe8f3148ea9940435..72f70b16d29984b1829b3998c611d4c9af524192 100644 (file)
@@ -111,6 +111,12 @@ policy->governor           must contain the "default policy" for
 For setting some of these values, the frequency table helpers might be
 helpful. See the section 2 for more information on them.
 
+SMP systems normally have same clock source for a group of cpus. For these the
+.init() would be called only once for the first online cpu. Here the .init()
+routine must initialize policy->cpus with mask of all possible cpus (Online +
+Offline) that share the clock. Then the core would copy this mask onto
+policy->related_cpus and will reset policy->cpus to carry only online cpus.
+
 
 1.3 verify
 ------------
index 04f6b32993e69ca4185a81bbaadb677aac5056e9..ff2f28332cc43b27c7b4fa787efe4d69aed76f0a 100644 (file)
@@ -190,11 +190,11 @@ scaling_max_freq          show the current "policy limits" (in
                                first set scaling_max_freq, then
                                scaling_min_freq.
 
-affected_cpus :                        List of CPUs that require software coordination
-                               of frequency.
+affected_cpus :                        List of Online CPUs that require software
+                               coordination of frequency.
 
-related_cpus :                 List of CPUs that need some sort of frequency
-                               coordination, whether software or hardware.
+related_cpus :                 List of Online + Offline CPUs that need software
+                               coordination of frequency.
 
 scaling_driver :               Hardware driver for cpufreq.
 
index 5fdc6c6e3f8a6bfb5fbb62c83c3398874ed7401f..753b198750cf68c5797ad129da47c5392ab21f37 100644 (file)
@@ -89,8 +89,10 @@ struct cpufreq_real_policy {
 };
 
 struct cpufreq_policy {
-       cpumask_var_t           cpus;   /* CPUs requiring sw coordination */
-       cpumask_var_t           related_cpus; /* CPUs with any coordination */
+       /* CPUs sharing clock, require sw coordination */
+       cpumask_var_t           cpus;   /* Online CPUs only */
+       cpumask_var_t           related_cpus; /* Online + Offline CPUs */
+
        unsigned int            shared_type; /* ANY or ALL affected CPUs
                                                should set cpufreq */
        unsigned int            cpu;    /* cpu nr of CPU managing this policy */