diff options
author | Len Brown <len.brown@intel.com> | 2010-10-19 13:58:34 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-10-19 13:58:34 -0400 |
commit | ab7c13c4a5a22335b0cfc6f364ee77abed66503c (patch) | |
tree | 25b66454cf398aa980574ec417e17dc72a8dfad9 /drivers/acpi | |
parent | 01eac60bccdb0ce49a2937d59da1e4749697a9aa (diff) |
ACPI: thermal: remove unused limit code
acpi_processor_apply_limit()
acpi_thermal_cpufreq_increase()
acpi_thermal_cpufreq_decrease()
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/processor_thermal.c | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/drivers/acpi/processor_thermal.c b/drivers/acpi/processor_thermal.c index 419f651b63f3..fde49b9b1d99 100644 --- a/drivers/acpi/processor_thermal.c +++ b/drivers/acpi/processor_thermal.c | |||
@@ -44,47 +44,6 @@ | |||
44 | #define _COMPONENT ACPI_PROCESSOR_COMPONENT | 44 | #define _COMPONENT ACPI_PROCESSOR_COMPONENT |
45 | ACPI_MODULE_NAME("processor_thermal"); | 45 | ACPI_MODULE_NAME("processor_thermal"); |
46 | 46 | ||
47 | /* -------------------------------------------------------------------------- | ||
48 | Limit Interface | ||
49 | -------------------------------------------------------------------------- */ | ||
50 | static int acpi_processor_apply_limit(struct acpi_processor *pr) | ||
51 | { | ||
52 | int result = 0; | ||
53 | u16 px = 0; | ||
54 | u16 tx = 0; | ||
55 | |||
56 | |||
57 | if (!pr) | ||
58 | return -EINVAL; | ||
59 | |||
60 | if (!pr->flags.limit) | ||
61 | return -ENODEV; | ||
62 | |||
63 | if (pr->flags.throttling) { | ||
64 | if (pr->limit.user.tx > tx) | ||
65 | tx = pr->limit.user.tx; | ||
66 | if (pr->limit.thermal.tx > tx) | ||
67 | tx = pr->limit.thermal.tx; | ||
68 | |||
69 | result = acpi_processor_set_throttling(pr, tx, false); | ||
70 | if (result) | ||
71 | goto end; | ||
72 | } | ||
73 | |||
74 | pr->limit.state.px = px; | ||
75 | pr->limit.state.tx = tx; | ||
76 | |||
77 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | ||
78 | "Processor [%d] limit set to (P%d:T%d)\n", pr->id, | ||
79 | pr->limit.state.px, pr->limit.state.tx)); | ||
80 | |||
81 | end: | ||
82 | if (result) | ||
83 | printk(KERN_ERR PREFIX "Unable to set limit\n"); | ||
84 | |||
85 | return result; | ||
86 | } | ||
87 | |||
88 | #ifdef CONFIG_CPU_FREQ | 47 | #ifdef CONFIG_CPU_FREQ |
89 | 48 | ||
90 | /* If a passive cooling situation is detected, primarily CPUfreq is used, as it | 49 | /* If a passive cooling situation is detected, primarily CPUfreq is used, as it |
@@ -107,36 +66,6 @@ static int cpu_has_cpufreq(unsigned int cpu) | |||
107 | return 1; | 66 | return 1; |
108 | } | 67 | } |
109 | 68 | ||
110 | static int acpi_thermal_cpufreq_increase(unsigned int cpu) | ||
111 | { | ||
112 | if (!cpu_has_cpufreq(cpu)) | ||
113 | return -ENODEV; | ||
114 | |||
115 | if (per_cpu(cpufreq_thermal_reduction_pctg, cpu) < | ||
116 | CPUFREQ_THERMAL_MAX_STEP) { | ||
117 | per_cpu(cpufreq_thermal_reduction_pctg, cpu)++; | ||
118 | cpufreq_update_policy(cpu); | ||
119 | return 0; | ||
120 | } | ||
121 | |||
122 | return -ERANGE; | ||
123 | } | ||
124 | |||
125 | static int acpi_thermal_cpufreq_decrease(unsigned int cpu) | ||
126 | { | ||
127 | if (!cpu_has_cpufreq(cpu)) | ||
128 | return -ENODEV; | ||
129 | |||
130 | if (per_cpu(cpufreq_thermal_reduction_pctg, cpu) > | ||
131 | (CPUFREQ_THERMAL_MIN_STEP + 1)) | ||
132 | per_cpu(cpufreq_thermal_reduction_pctg, cpu)--; | ||
133 | else | ||
134 | per_cpu(cpufreq_thermal_reduction_pctg, cpu) = 0; | ||
135 | cpufreq_update_policy(cpu); | ||
136 | /* We reached max freq again and can leave passive mode */ | ||
137 | return !per_cpu(cpufreq_thermal_reduction_pctg, cpu); | ||
138 | } | ||
139 | |||
140 | static int acpi_thermal_cpufreq_notifier(struct notifier_block *nb, | 69 | static int acpi_thermal_cpufreq_notifier(struct notifier_block *nb, |
141 | unsigned long event, void *data) | 70 | unsigned long event, void *data) |
142 | { | 71 | { |