summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/cpu.h
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1994-11-05 22:44:34 +0000
committerbde <bde@FreeBSD.org>1994-11-05 22:44:34 +0000
commit419fa2fad74e310fca8461dfd7f6abac7880bfd5 (patch)
treeb784f07aafebf63191caeb0b6c013bd68dd76c34 /sys/i386/include/cpu.h
parent84e8df56199fef73f7dcbc08df80b20de2368fda (diff)
downloadFreeBSD-src-419fa2fad74e310fca8461dfd7f6abac7880bfd5.zip
FreeBSD-src-419fa2fad74e310fca8461dfd7f6abac7880bfd5.tar.gz
Disable the direct call from hardclock() to softclock(). Support
for it is incomplete and buggy. There is no problem unless Xintr0() is reentered or should be reentered, but high clock interrupt frequencies for pcaudio cause Xintr0() to be reentered (or clock ticks to be lost when Xintr0() should have been reentered but wasn't), and we lose little by delaying the call to softclock(). Move declarations related to the clock driver to clock.h. Move declarations related to the npx driver to npx.h. Clean up the remaining declarations.
Diffstat (limited to 'sys/i386/include/cpu.h')
-rw-r--r--sys/i386/include/cpu.h27
1 files changed, 19 insertions, 8 deletions
diff --git a/sys/i386/include/cpu.h b/sys/i386/include/cpu.h
index 71febfd..e80564a 100644
--- a/sys/i386/include/cpu.h
+++ b/sys/i386/include/cpu.h
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)cpu.h 5.4 (Berkeley) 5/9/91
- * $Id: cpu.h,v 1.14 1994/10/15 21:18:11 ache Exp $
+ * $Id: cpu.h,v 1.15 1994/10/18 03:37:31 ache Exp $
*/
#ifndef _MACHINE_CPU_H_
@@ -59,7 +59,21 @@
#define CLKF_USERMODE(framep) (ISPL((framep)->cf_cs) == SEL_UPL)
#define CLKF_INTR(framep) (0)
+#if 0
+/*
+ * XXX splsoftclock() is very broken and barely worth fixing. It doesn't
+ * turn off the clock bit in imen or in the icu. (This is not a serious
+ * problem at 100 Hz but it is serious at 16000 Hz for pcaudio. softclock()
+ * can take more than 62.5 usec so clock interrupts are lost.) It doesn't
+ * check for pending interrupts being unmasked. clkintr() and Xintr0()
+ * assume that the ipl is high when hardclock() returns. Our SWI_AST
+ * handling is efficient enough that little is gained by calling
+ * softclock() directly.
+ */
#define CLKF_BASEPRI(framep) (((framep)->cf_ppl & ~SWI_AST_MASK) == 0)
+#else
+#define CLKF_BASEPRI(framep) (0)
+#endif
#define CLKF_PC(framep) ((framep)->cf_eip)
/*
@@ -110,15 +124,12 @@ struct cpu_nameclass {
}
#ifdef KERNEL
-extern int want_resched; /* resched was called */
-
-extern int cpu;
-extern int cpu_class;
+extern int cpu;
+extern int cpu_class;
extern struct cpu_nameclass i386_cpus[];
+extern int want_resched; /* resched was called */
+
int cpu_fork __P((struct proc *, struct proc *));
-int npxdna __P((void));
-void npxexit __P((struct proc *p));
-void resettodr __P((void));
#endif
#endif /* !_MACHINE_CPU_H_ */
OpenPOWER on IntegriCloud