summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2007-10-24 17:57:02 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2007-10-24 17:57:02 +0000
commit0b7585b7a2d18ed891350058bf8e28630e502fa2 (patch)
treebe6c661daada706c7abcb5053f48e4c549e3667d /sys
parent095a8f3234cd3183e9177d1ea4178a2d01aae4b8 (diff)
Remove idle loop counter.
ok art deraadt
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/amd64/pctr.c5
-rw-r--r--sys/arch/amd64/include/pctr.h3
-rw-r--r--sys/arch/i386/i386/locore.s6
-rw-r--r--sys/arch/i386/i386/pctr.c5
-rw-r--r--sys/arch/i386/include/pctr.h3
5 files changed, 5 insertions, 17 deletions
diff --git a/sys/arch/amd64/amd64/pctr.c b/sys/arch/amd64/amd64/pctr.c
index e47f4ddb6e8..fb1bbd43498 100644
--- a/sys/arch/amd64/amd64/pctr.c
+++ b/sys/arch/amd64/amd64/pctr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pctr.c,v 1.3 2007/10/24 06:30:21 mikeb Exp $ */
+/* $OpenBSD: pctr.c,v 1.4 2007/10/24 17:56:56 mikeb Exp $ */
/*
* Copyright (c) 2007 Mike Belopuhov
@@ -44,8 +44,6 @@
#define usepctr ((pctr_isamd || pctr_isintel) && \
((cpu_id >> 8) & 15) >= 6)
-u_int64_t pctr_idlcnt; /* Gets incremented in locore.S */
-
int pctr_isamd;
int pctr_isintel;
@@ -153,7 +151,6 @@ pctrioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p)
pctrrd(st);
else if (usetsc)
st->pctr_tsc = rdtsc();
- st->pctr_idl = pctr_idlcnt;
return (0);
}
case PCIOCS0:
diff --git a/sys/arch/amd64/include/pctr.h b/sys/arch/amd64/include/pctr.h
index 18e7f6fc14e..427bcb52ee0 100644
--- a/sys/arch/amd64/include/pctr.h
+++ b/sys/arch/amd64/include/pctr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pctr.h,v 1.2 2007/10/17 02:30:26 deraadt Exp $ */
+/* $OpenBSD: pctr.h,v 1.3 2007/10/24 17:56:57 mikeb Exp $ */
/*
* Pentium performance counter driver for OpenBSD.
@@ -22,7 +22,6 @@ struct pctrst {
u_int pctr_fn[PCTR_NUM]; /* Current settings of counters */
pctrval pctr_tsc; /* Free-running 64-bit cycle counter */
pctrval pctr_hwc[PCTR_NUM]; /* Values of the hardware counters */
- pctrval pctr_idl; /* Iterations of the idle loop */
};
/* Bit values in fn fields and PIOCS ioctl's */
diff --git a/sys/arch/i386/i386/locore.s b/sys/arch/i386/i386/locore.s
index ff5a97e22ce..84f8fc71ae7 100644
--- a/sys/arch/i386/i386/locore.s
+++ b/sys/arch/i386/i386/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.116 2007/10/10 15:53:51 art Exp $ */
+/* $OpenBSD: locore.s,v 1.117 2007/10/24 17:56:58 mikeb Exp $ */
/* $NetBSD: locore.s,v 1.145 1996/05/03 19:41:19 christos Exp $ */
/*-
@@ -1446,10 +1446,6 @@ ENTRY(cpu_idle_cycle)
#if NAPM > 0
call _C_LABEL(apm_cpu_idle)
#else
-#if NPCTR > 0
- addl $1,_C_LABEL(pctr_idlcnt)
- adcl $0,_C_LABEL(pctr_idlcnt)+4
-#endif
sti
hlt
#endif
diff --git a/sys/arch/i386/i386/pctr.c b/sys/arch/i386/i386/pctr.c
index dfb4905afb5..2ba407964c1 100644
--- a/sys/arch/i386/i386/pctr.c
+++ b/sys/arch/i386/i386/pctr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pctr.c,v 1.24 2007/10/24 06:30:25 mikeb Exp $ */
+/* $OpenBSD: pctr.c,v 1.25 2007/10/24 17:56:58 mikeb Exp $ */
/*
* Pentium performance counter driver for OpenBSD.
@@ -31,8 +31,6 @@
#define usepctr ((pctr_isamd || pctr_isintel) && \
((cpu_id >> 8) & 15) >= 6)
-u_int64_t pctr_idlcnt; /* Gets incremented in locore.S */
-
int pctr_isamd;
int pctr_isintel;
@@ -188,7 +186,6 @@ pctrioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p)
if (usetsc)
st->pctr_tsc = rdtsc();
}
- st->pctr_idl = pctr_idlcnt;
return (0);
}
case PCIOCS0:
diff --git a/sys/arch/i386/include/pctr.h b/sys/arch/i386/include/pctr.h
index d92d05fbe7e..8dcc8f228e1 100644
--- a/sys/arch/i386/include/pctr.h
+++ b/sys/arch/i386/include/pctr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pctr.h,v 1.14 2007/10/17 14:54:32 deraadt Exp $ */
+/* $OpenBSD: pctr.h,v 1.15 2007/10/24 17:56:59 mikeb Exp $ */
/*
* Pentium performance counter driver for OpenBSD.
@@ -22,7 +22,6 @@ struct pctrst {
u_int pctr_fn[PCTR_NUM]; /* Current settings of counters */
pctrval pctr_tsc; /* Free-running 64-bit cycle counter */
pctrval pctr_hwc[PCTR_NUM]; /* Values of the hardware counters */
- pctrval pctr_idl; /* Iterations of the idle loop */
};
/* Bit values in fn fields and PIOCS ioctl's */