NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-i386/43189: compiling i386 ALL with "options PERFCTRS" fails

>Number:         43189
>Category:       port-i386
>Synopsis:       compiling i386 ALL with "options PERFCTRS" fails
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-i386-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 21 21:40:00 +0000 2010
>Originator:     Greg A. Woods
>Release:        NetBSD-current 2010/04/21
Planix, Inc.; Toronto, Ontario; Canada
System: NetBSD
Architecture: i386
Machine: i386

    compile  ALL/pmc.o
/rest/work/woods/m-NetBSD-current/sys/arch/i386/i386/pmc.c: In function 
/rest/work/woods/m-NetBSD-current/sys/arch/i386/i386/pmc.c:125: error: 
'cpu_feature' undeclared (first use in this function)
/rest/work/woods/m-NetBSD-current/sys/arch/i386/i386/pmc.c:125: error: (Each 
undeclared identifier is reported only once
/rest/work/woods/m-NetBSD-current/sys/arch/i386/i386/pmc.c:125: error: for each 
function it appears in.)

        I then tried adding "#include <cpuvar.h>", but that of course
        only resulted in:

    compile  ALL/pmc.o
/rest/work/woods/m-NetBSD-current/sys/arch/i386/i386/pmc.c: In function 
/rest/work/woods/m-NetBSD-current/sys/arch/i386/i386/pmc.c:126: error: invalid 
operands to binary &


        try compiling i386 ALL kernel


        I don't know if this is right or not, but it compiles....

Index: sys/arch/i386/i386/pmc.c
RCS file: /cvs/master/m-NetBSD/main/src/sys/arch/i386/i386/pmc.c,v
retrieving revision 1.17
diff -u -r1.17 pmc.c
--- sys/arch/i386/i386/pmc.c    11 May 2008 14:44:54 -0000      1.17
+++ sys/arch/i386/i386/pmc.c    21 Apr 2010 21:30:25 -0000
@@ -122,7 +122,7 @@
-       if (pmc_type != PMC_TYPE_NONE && (cpu_feature & CPUID_TSC) != 0)
+       if (pmc_type != PMC_TYPE_NONE && cpu_hascounter())
                pmc_flags |= PMC_INFO_HASTSC;

Home | Main Index | Thread Index | Old Index