lkml.org 
[lkml]   [2014]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 10/16] sched, cpufreq: Current compute capacity hack for ARM TC2
Date
Hack to report different cpu capacities for big and little cpus.
This is for experimentation on ARM TC2 _only_. A proper solution
has to address this problem.

Signed-off-by: Morten Rasmussen <morten.rasmussen@arm.com>
---
drivers/cpufreq/cpufreq.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index a2b788d..134d777 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -316,7 +316,13 @@ static void __cpufreq_notify_transition(struct cpufreq_policy *policy,
pr_debug("FREQ: %lu - CPU: %lu\n",
(unsigned long)freqs->new, (unsigned long)freqs->cpu);
trace_cpu_frequency(freqs->new, freqs->cpu);
- set_curr_capacity(freqs->cpu, (freqs->new*1024)/policy->max);
+ /* Massive TC2 hack */
+ if (freqs->cpu == 1 || freqs->cpu == 2)
+ /* A15 cpus (max_capacity = 2015) */
+ set_curr_capacity(freqs->cpu, (freqs->new*2015)/1200000);
+ else
+ /* A7 cpus (nax_capacity = 1024) */
+ set_curr_capacity(freqs->cpu, (freqs->new*1024)/1000000);
srcu_notifier_call_chain(&cpufreq_transition_notifier_list,
CPUFREQ_POSTCHANGE, freqs);
if (likely(policy) && likely(policy->cpu == freqs->cpu))
--
1.7.9.5



\
 
 \ /
  Last update: 2014-05-23 21:01    [W:0.173 / U:2.656 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site