cpufreq: Remove unnecessary use of policy->shared_type
authorViresh Kumar <viresh.kumar@linaro.org>
Fri, 1 Feb 2013 06:40:02 +0000 (06:40 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 2 Feb 2013 00:29:32 +0000 (01:29 +0100)
policy->shared_type field was added only for SoCs with ACPI support:

commit 3b2d99429e3386b6e2ac949fc72486509c8bbe36
Author: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Date:   Wed Dec 14 15:05:00 2005 -0500

    P-state software coordination for ACPI core

    http://bugzilla.kernel.org/show_bug.cgi?id=5737

Many non-ACPI systems are filling this field by mistake, which makes its usage
confusing. Lets clean it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
arch/arm/mach-tegra/cpu-tegra.c
drivers/cpufreq/cpufreq-cpu0.c
drivers/cpufreq/db8500-cpufreq.c
drivers/cpufreq/omap-cpufreq.c
include/linux/cpufreq.h

index e7ddcb2b5261ba8a50a306ef4062a42769f84f0e..a36a03d3c9a08f8af52d9ad4d679e494cfa7016b 100644 (file)
@@ -243,7 +243,6 @@ static int tegra_cpu_init(struct cpufreq_policy *policy)
        /* FIXME: what's the actual transition time? */
        policy->cpuinfo.transition_latency = 300 * 1000;
 
-       policy->shared_type = CPUFREQ_SHARED_TYPE_ALL;
        cpumask_copy(policy->cpus, cpu_possible_mask);
 
        if (policy->cpu == 0)
index a108f66271eeddea35790adab7e791d0e70c75a6..4e5b7fb8927cb5304e3baf37dc3ccb87e71c31b9 100644 (file)
@@ -146,7 +146,6 @@ static int cpu0_cpufreq_init(struct cpufreq_policy *policy)
         * share the clock and voltage and clock.  Use cpufreq affected_cpus
         * interface to have all CPUs scaled together.
         */
-       policy->shared_type = CPUFREQ_SHARED_TYPE_ANY;
        cpumask_setall(policy->cpus);
 
        cpufreq_frequency_table_get_attr(freq_table, policy->cpu);
index e12dff601b8a6f8855d8b1e2148d9fa2fab5d31d..79a84860ea56e3a5b119b4181d512fddbb7e93cb 100644 (file)
@@ -130,8 +130,6 @@ static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy)
        /* policy sharing between dual CPUs */
        cpumask_setall(policy->cpus);
 
-       policy->shared_type = CPUFREQ_SHARED_TYPE_ALL;
-
        return 0;
 }
 
index 97102b05843fa580435ae0ae5b872d9467b577df..9128c07bafba37c22b46e2b425a43666264fecfe 100644 (file)
@@ -214,10 +214,8 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
         * interface to handle this scenario. Additional is_smp() check
         * is to keep SMP_ON_UP build working.
         */
-       if (is_smp()) {
-               policy->shared_type = CPUFREQ_SHARED_TYPE_ANY;
+       if (is_smp())
                cpumask_setall(policy->cpus);
-       }
 
        /* FIXME: what's the actual transition time? */
        policy->cpuinfo.transition_latency = 300 * 1000;
index 6bf3f2d12c9065b95eb6fecb521e09e9f2da03b6..a22944ca05266ccb5761fc7e2fcf15fec2d8e2d6 100644 (file)
@@ -93,7 +93,7 @@ struct cpufreq_policy {
        cpumask_var_t           cpus;   /* Online CPUs only */
        cpumask_var_t           related_cpus; /* Online + Offline CPUs */
 
-       unsigned int            shared_type; /* ANY or ALL affected CPUs
+       unsigned int            shared_type; /* ACPI: ANY or ALL affected CPUs
                                                should set cpufreq */
        unsigned int            cpu;    /* cpu nr of CPU managing this policy */
        unsigned int            last_cpu; /* cpu nr of previous CPU that managed
@@ -122,6 +122,7 @@ struct cpufreq_policy {
 #define CPUFREQ_START                  (3)
 #define CPUFREQ_UPDATE_POLICY_CPU      (4)
 
+/* Only for ACPI */
 #define CPUFREQ_SHARED_TYPE_NONE (0) /* None */
 #define CPUFREQ_SHARED_TYPE_HW  (1) /* HW does needed coordination */
 #define CPUFREQ_SHARED_TYPE_ALL         (2) /* All dependent CPUs should set freq */