Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/samsung Update the cycle counter i.e. our CPU f...
details: https://anonhg.NetBSD.org/src/rev/c45cc4c1d886
branches: trunk
changeset: 331944:c45cc4c1d886
user: reinoud <reinoud%NetBSD.org@localhost>
date: Mon Sep 01 14:19:27 2014 +0000
description:
Update the cycle counter i.e. our CPU frequency for all CPUs on setting the
cpu frequency.
diffstat:
sys/arch/arm/samsung/exynos_soc.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diffs (50 lines):
diff -r d79dda8704ba -r c45cc4c1d886 sys/arch/arm/samsung/exynos_soc.c
--- a/sys/arch/arm/samsung/exynos_soc.c Mon Sep 01 13:50:15 2014 +0000
+++ b/sys/arch/arm/samsung/exynos_soc.c Mon Sep 01 14:19:27 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exynos_soc.c,v 1.17 2014/08/28 20:29:05 snj Exp $ */
+/* $NetBSD: exynos_soc.c,v 1.18 2014/09/01 14:19:27 reinoud Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -33,7 +33,7 @@
#define _ARM32_BUS_DMA_PRIVATE
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: exynos_soc.c,v 1.17 2014/08/28 20:29:05 snj Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exynos_soc.c,v 1.18 2014/09/01 14:19:27 reinoud Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -349,9 +349,11 @@
static void
exynos_set_cpufreq(const struct cpu_freq *freqreq)
{
+ struct cpu_info *ci;
uint32_t reg = 0;
uint32_t regval;
int M, P, S;
+ int cii;
M = freqreq->M;
P = freqreq->P;
@@ -374,6 +376,11 @@
/* enable PPL and write config */
regval |= PLL_CON0_ENABLE;
bus_space_write_4(&exynos_bs_tag, exynos_core_bsh, reg, regval);
+
+ /* update our cycle counter i.e. our CPU frequency for all CPUs */
+ for (CPU_INFO_FOREACH(cii, ci)) {
+ ci->ci_data.cpu_cc_freq = exynos_get_cpufreq();
+ }
}
@@ -458,7 +465,6 @@
/* set max cpufreq */
exynos_set_cpufreq(&cpu_freq_settings[ncpu_freq_settings-1]);
- curcpu()->ci_data.cpu_cc_freq = exynos_get_cpufreq();
}
Home |
Main Index |
Thread Index |
Old Index