Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/arm always start PMC cycle counter for ARM11 an...
details: https://anonhg.NetBSD.org/src/rev/7b31a0d10392
branches: trunk
changeset: 781254:7b31a0d10392
user: matt <matt%NetBSD.org@localhost>
date: Wed Aug 29 18:29:04 2012 +0000
description:
always start PMC cycle counter for ARM11 and Cortex.
diffstat:
sys/arch/arm/arm/cpufunc.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diffs (42 lines):
diff -r c5e7f37e6cfb -r 7b31a0d10392 sys/arch/arm/arm/cpufunc.c
--- a/sys/arch/arm/arm/cpufunc.c Wed Aug 29 18:05:41 2012 +0000
+++ b/sys/arch/arm/arm/cpufunc.c Wed Aug 29 18:29:04 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpufunc.c,v 1.111 2012/08/29 07:14:03 matt Exp $ */
+/* $NetBSD: cpufunc.c,v 1.112 2012/08/29 18:29:04 matt Exp $ */
/*
* arm7tdmi support code Copyright (c) 2001 John Fremlin
@@ -49,7 +49,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.111 2012/08/29 07:14:03 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.112 2012/08/29 18:29:04 matt Exp $");
#include "opt_compat_netbsd.h"
#include "opt_cpuoptions.h"
@@ -1718,6 +1718,10 @@
if (arm_cache_prefer_mask)
uvmexp.ncolors = (arm_cache_prefer_mask >> PGSHIFT) + 1;
+ /*
+ * Start and reset the PMC Cycle Counter.
+ */
+ armreg_pmcrv6_write(ARM11_PMCCTL_E | ARM11_PMCCTL_P | ARM11_PMCCTL_C);
return 0;
}
#endif /* CPU_ARM11 */
@@ -1901,7 +1905,11 @@
pmap_pte_init_armv7();
if (arm_cache_prefer_mask)
uvmexp.ncolors = (arm_cache_prefer_mask >> PGSHIFT) + 1;
-
+ /*
+ * Start and reset the PMC Cycle Counter.
+ */
+ armreg_pmcr_write(ARM11_PMCCTL_E | ARM11_PMCCTL_P | ARM11_PMCCTL_C);
+ armreg_pmcntenset_write(CORTEX_CNTENS_C);
return 0;
}
#endif /* CPU_CORTEX */
Home |
Main Index |
Thread Index |
Old Index