summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2007-09-07 08:37:39 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2007-09-07 08:37:39 +0000
commit0536dbbe989d19fcaf01c1d0dec6c72547b0ae67 (patch)
tree7027fa10c6cb20418c4724cae298c4ea18dbbf76 /sys/arch
parent348c2857dcafa5676b8db26793f62df3485a5e65 (diff)
Remove some left-overs from the TSC based microtime. We don't need
to synchronize the tsc between CPUs anymore. While here, also remove the slow TLB IPI since it's been dead for a while. noticed by mickey toby@ ok
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/i386/i386/ipifuncs.c4
-rw-r--r--sys/arch/i386/i386/lapic.c49
-rw-r--r--sys/arch/i386/include/cpu.h3
-rw-r--r--sys/arch/i386/include/intr.h3
-rw-r--r--sys/arch/i386/include/intrdefs.h22
5 files changed, 15 insertions, 66 deletions
diff --git a/sys/arch/i386/i386/ipifuncs.c b/sys/arch/i386/i386/ipifuncs.c
index 711c6cf278d..3264012587e 100644
--- a/sys/arch/i386/i386/ipifuncs.c
+++ b/sys/arch/i386/i386/ipifuncs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipifuncs.c,v 1.8 2007/05/25 15:55:26 art Exp $ */
+/* $OpenBSD: ipifuncs.c,v 1.9 2007/09/07 08:37:38 art Exp $ */
/* $NetBSD: ipifuncs.c,v 1.1.2.3 2000/06/26 02:04:06 sommerfeld Exp $ */
/*-
@@ -74,10 +74,8 @@ void i386_ipi_flush_fpu(struct cpu_info *);
void (*ipifunc[I386_NIPI])(struct cpu_info *) =
{
i386_ipi_halt,
- i386_ipi_microset,
i386_ipi_flush_fpu,
i386_ipi_synch_fpu,
- NULL,
#if 0
i386_reload_mtrr,
gdt_reload_cpu,
diff --git a/sys/arch/i386/i386/lapic.c b/sys/arch/i386/i386/lapic.c
index b4023c3f624..bca45e45ba7 100644
--- a/sys/arch/i386/i386/lapic.c
+++ b/sys/arch/i386/i386/lapic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lapic.c,v 1.17 2007/08/01 13:18:18 martin Exp $ */
+/* $OpenBSD: lapic.c,v 1.18 2007/09/07 08:37:38 art Exp $ */
/* $NetBSD: lapic.c,v 1.1.2.8 2000/02/23 06:10:50 sommerfeld Exp $ */
/*-
@@ -218,16 +218,10 @@ u_int32_t lapic_delaytab[26];
u_int64_t scaled_pentium_mhz;
void
-lapic_clockintr(arg)
- void *arg;
+lapic_clockintr(void *arg)
{
- struct cpu_info *ci = curcpu();
struct clockframe *frame = arg;
- if (CPU_IS_PRIMARY(ci)) {
- ci->ci_tscbase = rdtsc();
- i386_broadcast_ipi(I386_IPI_MICROSET);
- }
hardclock(frame);
clk_count.ec_count++;
@@ -423,45 +417,6 @@ lapic_delay(int usec)
}
}
-#define LAPIC_TICK_THRESH 200
-
-/*
- * An IPI handler to record current timer value
- */
-void
-i386_ipi_microset(struct cpu_info *ci)
-{
- ci->ci_tscbase = rdtsc();
-}
-
-#if 0
-/*
- * XXX need to make work correctly on other than cpu 0.
- */
-void
-lapic_microtime(tv)
- struct timeval *tv;
-{
- struct cpu_info *ci = curcpu();
- struct timeval now;
- u_int64_t tmp;
-
- disable_intr();
- now = time;
- tmp = rdtsc() - ci->ci_tscbase;
- enable_intr();
-
- now.tv_usec += (tmp * scaled_pentium_mhz) >> 32;
-
- while (now.tv_usec >= 1000000) {
- now.tv_sec += 1;
- now.tv_usec -= 1000000;
- }
-
- *tv = now;
-}
-#endif
-
/*
* XXX the following belong mostly or partly elsewhere..
*/
diff --git a/sys/arch/i386/include/cpu.h b/sys/arch/i386/include/cpu.h
index 3997c8fd758..3456277cc71 100644
--- a/sys/arch/i386/include/cpu.h
+++ b/sys/arch/i386/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.95 2007/06/07 11:20:58 dim Exp $ */
+/* $OpenBSD: cpu.h,v 1.96 2007/09/07 08:37:38 art Exp $ */
/* $NetBSD: cpu.h,v 1.35 1996/05/05 19:29:26 christos Exp $ */
/*-
@@ -114,7 +114,6 @@ struct cpu_info {
u_long ci_flags; /* flags; see below */
u_int32_t ci_ipis; /* interprocessor interrupts pending */
int sc_apic_version;/* local APIC version */
- u_int64_t ci_tscbase;
u_int32_t ci_level;
u_int32_t ci_vendor[4];
diff --git a/sys/arch/i386/include/intr.h b/sys/arch/i386/include/intr.h
index 0d69c57277a..d6b5a187800 100644
--- a/sys/arch/i386/include/intr.h
+++ b/sys/arch/i386/include/intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.h,v 1.32 2007/05/25 15:55:27 art Exp $ */
+/* $OpenBSD: intr.h,v 1.33 2007/09/07 08:37:38 art Exp $ */
/* $NetBSD: intr.h,v 1.5 1996/05/13 06:11:28 mycroft Exp $ */
/*
@@ -141,7 +141,6 @@ int i386_fast_ipi(struct cpu_info *, int);
void i386_broadcast_ipi(int);
void i386_multicast_ipi(int, int);
void i386_ipi_handler(void);
-void i386_ipi_microset(struct cpu_info *);
void i386_intlock(int);
void i386_intunlock(int);
void i386_softintlock(void);
diff --git a/sys/arch/i386/include/intrdefs.h b/sys/arch/i386/include/intrdefs.h
index babc8966c3e..b420765376b 100644
--- a/sys/arch/i386/include/intrdefs.h
+++ b/sys/arch/i386/include/intrdefs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intrdefs.h,v 1.8 2007/04/21 21:06:15 gwk Exp $ */
+/* $OpenBSD: intrdefs.h,v 1.9 2007/09/07 08:37:38 art Exp $ */
/* $NetBSD: intrdefs.h,v 1.2 2003/05/04 22:01:56 fvdl Exp $ */
#ifndef _i386_INTRDEFS_H
@@ -108,19 +108,17 @@
#define IDT_INTR_HIGH 0xef
#define I386_IPI_HALT 0x00000001
-#define I386_IPI_MICROSET 0x00000002
-#define I386_IPI_FLUSH_FPU 0x00000004
-#define I386_IPI_SYNCH_FPU 0x00000008
-#define I386_IPI_TLB 0x00000010
-#define I386_IPI_MTRR 0x00000020
-#define I386_IPI_GDT 0x00000040
-#define I386_IPI_DDB 0x00000080 /* synchronize while in ddb */
-#define I386_IPI_SETPERF 0x00000100
+#define I386_IPI_FLUSH_FPU 0x00000002
+#define I386_IPI_SYNCH_FPU 0x00000004
+#define I386_IPI_MTRR 0x00000008
+#define I386_IPI_GDT 0x00000010
+#define I386_IPI_DDB 0x00000020 /* synchronize while in ddb */
+#define I386_IPI_SETPERF 0x00000040
-#define I386_NIPI 9
+#define I386_NIPI 7
-#define I386_IPI_NAMES { "halt IPI", "timeset IPI", "FPU flush IPI", \
- "FPU synch IPI", "TLB shootdown IPI", \
+#define I386_IPI_NAMES { "halt IPI", "FPU flush IPI", \
+ "FPU synch IPI", \
"MTRR update IPI", "GDT update IPI", \
"DDB IPI", "setperf IPI" }