提交 62b36cc1 编写于 作者: V Viresh Kumar 提交者: Rafael J. Wysocki

cpufreq: Remove unnecessary use of policy->shared_type

policy->shared_type field was added only for SoCs with ACPI support:

commit 3b2d9942
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: NViresh Kumar <viresh.kumar@linaro.org>
Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 4c738d00
...@@ -243,7 +243,6 @@ static int tegra_cpu_init(struct cpufreq_policy *policy) ...@@ -243,7 +243,6 @@ static int tegra_cpu_init(struct cpufreq_policy *policy)
/* FIXME: what's the actual transition time? */ /* FIXME: what's the actual transition time? */
policy->cpuinfo.transition_latency = 300 * 1000; policy->cpuinfo.transition_latency = 300 * 1000;
policy->shared_type = CPUFREQ_SHARED_TYPE_ALL;
cpumask_copy(policy->cpus, cpu_possible_mask); cpumask_copy(policy->cpus, cpu_possible_mask);
if (policy->cpu == 0) if (policy->cpu == 0)
......
...@@ -146,7 +146,6 @@ static int cpu0_cpufreq_init(struct cpufreq_policy *policy) ...@@ -146,7 +146,6 @@ static int cpu0_cpufreq_init(struct cpufreq_policy *policy)
* share the clock and voltage and clock. Use cpufreq affected_cpus * share the clock and voltage and clock. Use cpufreq affected_cpus
* interface to have all CPUs scaled together. * interface to have all CPUs scaled together.
*/ */
policy->shared_type = CPUFREQ_SHARED_TYPE_ANY;
cpumask_setall(policy->cpus); cpumask_setall(policy->cpus);
cpufreq_frequency_table_get_attr(freq_table, policy->cpu); cpufreq_frequency_table_get_attr(freq_table, policy->cpu);
......
...@@ -130,8 +130,6 @@ static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy) ...@@ -130,8 +130,6 @@ static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy)
/* policy sharing between dual CPUs */ /* policy sharing between dual CPUs */
cpumask_setall(policy->cpus); cpumask_setall(policy->cpus);
policy->shared_type = CPUFREQ_SHARED_TYPE_ALL;
return 0; return 0;
} }
......
...@@ -214,10 +214,8 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy) ...@@ -214,10 +214,8 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
* interface to handle this scenario. Additional is_smp() check * interface to handle this scenario. Additional is_smp() check
* is to keep SMP_ON_UP build working. * is to keep SMP_ON_UP build working.
*/ */
if (is_smp()) { if (is_smp())
policy->shared_type = CPUFREQ_SHARED_TYPE_ANY;
cpumask_setall(policy->cpus); cpumask_setall(policy->cpus);
}
/* FIXME: what's the actual transition time? */ /* FIXME: what's the actual transition time? */
policy->cpuinfo.transition_latency = 300 * 1000; policy->cpuinfo.transition_latency = 300 * 1000;
......
...@@ -93,7 +93,7 @@ struct cpufreq_policy { ...@@ -93,7 +93,7 @@ struct cpufreq_policy {
cpumask_var_t cpus; /* Online CPUs only */ cpumask_var_t cpus; /* Online CPUs only */
cpumask_var_t related_cpus; /* Online + Offline CPUs */ 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 */ should set cpufreq */
unsigned int cpu; /* cpu nr of CPU managing this policy */ unsigned int cpu; /* cpu nr of CPU managing this policy */
unsigned int last_cpu; /* cpu nr of previous CPU that managed unsigned int last_cpu; /* cpu nr of previous CPU that managed
...@@ -122,6 +122,7 @@ struct cpufreq_policy { ...@@ -122,6 +122,7 @@ struct cpufreq_policy {
#define CPUFREQ_START (3) #define CPUFREQ_START (3)
#define CPUFREQ_UPDATE_POLICY_CPU (4) #define CPUFREQ_UPDATE_POLICY_CPU (4)
/* Only for ACPI */
#define CPUFREQ_SHARED_TYPE_NONE (0) /* None */ #define CPUFREQ_SHARED_TYPE_NONE (0) /* None */
#define CPUFREQ_SHARED_TYPE_HW (1) /* HW does needed coordination */ #define CPUFREQ_SHARED_TYPE_HW (1) /* HW does needed coordination */
#define CPUFREQ_SHARED_TYPE_ALL (2) /* All dependent CPUs should set freq */ #define CPUFREQ_SHARED_TYPE_ALL (2) /* All dependent CPUs should set freq */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册