aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTuukka Tikkanen <tuukka.tikkanen@linaro.org>2014-12-10 16:08:25 +0200
committerTuukka Tikkanen <tuukka.tikkanen@linaro.org>2014-12-17 14:06:31 +0200
commit1b4211cbbdadd22759f07ded97f74aa5ad0992a4 (patch)
treebc5bad775fb009fd62000dce14c441285d32a463
parentdd89f9215bf7c2e345716eb09dfa975f1f1d15dc (diff)
topology: Add baseline trace support to establish_idledata_to_topo
The establish_idledata_to_topo copies addresses of cstate and pstate data from a struct cpuidle_datas to struct cpu_cpu's that are used by the topology code. This patch adds support for copying addresses of baseline data pointed to by baseline member of the datas structure. Signed-off-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
-rw-r--r--topology.c10
-rw-r--r--topology.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/topology.c b/topology.c
index ef7cc07..25281ab 100644
--- a/topology.c
+++ b/topology.c
@@ -450,17 +450,27 @@ int establish_idledata_to_topo(struct cpuidle_datas *datas)
int i;
int has_topo = 0;
struct cpu_topology *topo;
+ struct cpuidle_datas *baseline;
assert(datas != NULL);
topo = datas->topo;
assert(topo != NULL);
+ if (datas->baseline)
+ baseline = datas->baseline;
+ else
+ baseline = NULL;
+
for (i = 0; i < datas->nrcpus; i++) {
s_cpu = find_cpu_point(topo, i);
if (s_cpu) {
s_cpu->cstates = &datas->cstates[i];
s_cpu->pstates = &datas->pstates[i];
has_topo = 1;
+ if (baseline) {
+ s_cpu->base_cstates = baseline->cstates + i;
+ s_cpu->base_pstates = baseline->pstates + i;
+ }
}
}
diff --git a/topology.h b/topology.h
index cf98b8a..8ebcf45 100644
--- a/topology.h
+++ b/topology.h
@@ -38,6 +38,8 @@ struct cpu_cpu {
int cpu_id;
struct cpuidle_cstates *cstates;
struct cpufreq_pstates *pstates;
+ struct cpuidle_cstates *base_cstates;
+ struct cpufreq_pstates *base_pstates;
};
struct cpu_core {