Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/xscale When configuring a counter, do not assum...
details: https://anonhg.NetBSD.org/src/rev/7b7e9742a914
branches: trunk
changeset: 535028:7b7e9742a914
user: briggs <briggs%NetBSD.org@localhost>
date: Thu Aug 08 18:23:46 2002 +0000
description:
When configuring a counter, do not assume that it's not been configured in
this process (mask off the register field before setting it).
diffstat:
sys/arch/arm/xscale/xscale_pmc.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (37 lines):
diff -r 975d00adb96a -r 7b7e9742a914 sys/arch/arm/xscale/xscale_pmc.c
--- a/sys/arch/arm/xscale/xscale_pmc.c Thu Aug 08 17:06:31 2002 +0000
+++ b/sys/arch/arm/xscale/xscale_pmc.c Thu Aug 08 18:23:46 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xscale_pmc.c,v 1.2 2002/08/07 21:11:35 thorpej Exp $ */
+/* $NetBSD: xscale_pmc.c,v 1.3 2002/08/08 18:23:46 briggs Exp $ */
/*
* Copyright (c) 2002 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xscale_pmc.c,v 1.2 2002/08/07 21:11:35 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xscale_pmc.c,v 1.3 2002/08/08 18:23:46 briggs Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
@@ -499,15 +499,18 @@
switch (ctr) {
case __PMC_CCNT_I:
+ pmcs->pmnc &= ~PMNC_D;
pmcs->pmnc |= (PMNC_CC_IF | PMNC_CC_IE);
if (cfg->event_id == 0x101)
pmcs->pmnc |= PMNC_D;
break;
case __PMC0_I:
+ pmcs->pmnc &= ~PMNC_EVCNT0_MASK;
pmcs->pmnc |= (cfg->event_id << PMNC_EVCNT0_SHIFT)
| (PMNC_PMN0_IF | PMNC_PMN0_IE);
break;
case __PMC1_I:
+ pmcs->pmnc &= ~PMNC_EVCNT1_MASK;
pmcs->pmnc |= (cfg->event_id << PMNC_EVCNT1_SHIFT)
| (PMNC_PMN1_IF | PMNC_PMN1_IE);
break;
Home |
Main Index |
Thread Index |
Old Index