Subject: port-i386/26437: pmc not working in 2.0_BETA
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <"pavel@cahyna"@st.mff.cuni.cz>
List: netbsd-bugs
Date: 07/26/2004 18:07:42
>Number:         26437
>Category:       port-i386
>Synopsis:       pmc not working in 2.0_BETA
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    port-i386-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 26 20:32:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Pavel Cahyna
>Release:        2.0_BETA
>Organization:
>Environment:
>Description:
I've compiled a kernel with pmc support and discovered that it does not
work, even if my CPU (Pentium II) has pmc support. (pmc -h prints 
pmc: PMC counters are not supported for your CPU (0x0) .)

The cause seems to be this commit to sys/arch/i386/i386/pmc.c :

----------------------------
revision 1.5
date: 2002/10/05 05:55:46;  author: gmcgarry;  state: Exp;  lines: +4 -2
branches:  1.5.2;
At least make it compile even though it doesn't make sense.
----------------------------

The log mesage is correct.
>How-To-Repeat:
pmc -h on a kernel with options         PERFCTRS
>Fix:
Upgrade sys/arch/i386/i386/pmc.c to rev. 1.7
>Release-Note:
>Audit-Trail:
>Unformatted: