diff options
| author | Dirk Brandewie <dirk.j.brandewie@intel.com> | 2013-05-07 11:20:28 -0400 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-05-12 08:04:17 -0400 |
| commit | a73108d578559c83e35fa386a4058142a019b8d4 (patch) | |
| tree | 170097454bf55c6b85a33580913354a8db2f2c81 | |
| parent | ca182aee389f8026401510f4c63841cb02c820e8 (diff) | |
cpufreq / intel_pstate: Remove idle mode PID
Remove dead code from the driver.
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| -rw-r--r-- | drivers/cpufreq/intel_pstate.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index a7f1946b3452..b93e3851b5d3 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c | |||
| @@ -81,10 +81,8 @@ struct cpudata { | |||
| 81 | struct pstate_adjust_policy *pstate_policy; | 81 | struct pstate_adjust_policy *pstate_policy; |
| 82 | struct pstate_data pstate; | 82 | struct pstate_data pstate; |
| 83 | struct _pid pid; | 83 | struct _pid pid; |
| 84 | struct _pid idle_pid; | ||
| 85 | 84 | ||
| 86 | int min_pstate_count; | 85 | int min_pstate_count; |
| 87 | int idle_mode; | ||
| 88 | 86 | ||
| 89 | u64 prev_aperf; | 87 | u64 prev_aperf; |
| 90 | u64 prev_mperf; | 88 | u64 prev_mperf; |
| @@ -199,19 +197,6 @@ static inline void intel_pstate_busy_pid_reset(struct cpudata *cpu) | |||
| 199 | 0); | 197 | 0); |
| 200 | } | 198 | } |
| 201 | 199 | ||
| 202 | static inline void intel_pstate_idle_pid_reset(struct cpudata *cpu) | ||
| 203 | { | ||
| 204 | pid_p_gain_set(&cpu->idle_pid, cpu->pstate_policy->p_gain_pct); | ||
| 205 | pid_d_gain_set(&cpu->idle_pid, cpu->pstate_policy->d_gain_pct); | ||
| 206 | pid_i_gain_set(&cpu->idle_pid, cpu->pstate_policy->i_gain_pct); | ||
| 207 | |||
| 208 | pid_reset(&cpu->idle_pid, | ||
| 209 | 75, | ||
| 210 | 50, | ||
| 211 | cpu->pstate_policy->deadband, | ||
| 212 | 0); | ||
| 213 | } | ||
| 214 | |||
| 215 | static inline void intel_pstate_reset_all_pid(void) | 200 | static inline void intel_pstate_reset_all_pid(void) |
| 216 | { | 201 | { |
| 217 | unsigned int cpu; | 202 | unsigned int cpu; |
| @@ -481,16 +466,6 @@ static inline void intel_pstate_set_sample_time(struct cpudata *cpu) | |||
| 481 | mod_timer_pinned(&cpu->timer, jiffies + delay); | 466 | mod_timer_pinned(&cpu->timer, jiffies + delay); |
| 482 | } | 467 | } |
| 483 | 468 | ||
| 484 | static inline void intel_pstate_idle_mode(struct cpudata *cpu) | ||
| 485 | { | ||
| 486 | cpu->idle_mode = 1; | ||
| 487 | } | ||
| 488 | |||
| 489 | static inline void intel_pstate_normal_mode(struct cpudata *cpu) | ||
| 490 | { | ||
| 491 | cpu->idle_mode = 0; | ||
| 492 | } | ||
| 493 | |||
| 494 | static inline int intel_pstate_get_scaled_busy(struct cpudata *cpu) | 469 | static inline int intel_pstate_get_scaled_busy(struct cpudata *cpu) |
| 495 | { | 470 | { |
| 496 | int32_t busy_scaled; | 471 | int32_t busy_scaled; |
| @@ -523,29 +498,6 @@ static inline void intel_pstate_adjust_busy_pstate(struct cpudata *cpu) | |||
| 523 | intel_pstate_pstate_decrease(cpu, steps); | 498 | intel_pstate_pstate_decrease(cpu, steps); |
| 524 | } | 499 | } |
| 525 | 500 | ||
| 526 | static inline void intel_pstate_adjust_idle_pstate(struct cpudata *cpu) | ||
| 527 | { | ||
| 528 | int busy_scaled; | ||
| 529 | struct _pid *pid; | ||
| 530 | int ctl = 0; | ||
| 531 | int steps; | ||
| 532 | |||
| 533 | pid = &cpu->idle_pid; | ||
| 534 | |||
| 535 | busy_scaled = intel_pstate_get_scaled_busy(cpu); | ||
| 536 | |||
| 537 | ctl = pid_calc(pid, 100 - busy_scaled); | ||
| 538 | |||
| 539 | steps = abs(ctl); | ||
| 540 | if (ctl < 0) | ||
| 541 | intel_pstate_pstate_decrease(cpu, steps); | ||
| 542 | else | ||
| 543 | intel_pstate_pstate_increase(cpu, steps); | ||
| 544 | |||
| 545 | if (cpu->pstate.current_pstate == cpu->pstate.min_pstate) | ||
| 546 | intel_pstate_normal_mode(cpu); | ||
| 547 | } | ||
| 548 | |||
| 549 | static void intel_pstate_timer_func(unsigned long __data) | 501 | static void intel_pstate_timer_func(unsigned long __data) |
| 550 | { | 502 | { |
| 551 | struct cpudata *cpu = (struct cpudata *) __data; | 503 | struct cpudata *cpu = (struct cpudata *) __data; |
| @@ -601,7 +553,6 @@ static int intel_pstate_init_cpu(unsigned int cpunum) | |||
| 601 | (unsigned long)cpu; | 553 | (unsigned long)cpu; |
| 602 | cpu->timer.expires = jiffies + HZ/100; | 554 | cpu->timer.expires = jiffies + HZ/100; |
| 603 | intel_pstate_busy_pid_reset(cpu); | 555 | intel_pstate_busy_pid_reset(cpu); |
| 604 | intel_pstate_idle_pid_reset(cpu); | ||
| 605 | intel_pstate_sample(cpu); | 556 | intel_pstate_sample(cpu); |
| 606 | intel_pstate_set_pstate(cpu, cpu->pstate.max_pstate); | 557 | intel_pstate_set_pstate(cpu, cpu->pstate.max_pstate); |
| 607 | 558 | ||
