Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mips/include Only define machdep sysctls if CPU_MAX...



details:   https://anonhg.NetBSD.org/src/rev/776d85a0faaa
branches:  trunk
changeset: 494692:776d85a0faaa
user:      jeffs <jeffs%NetBSD.org@localhost>
date:      Tue Jul 11 06:34:57 2000 +0000

description:
Only define machdep sysctls if CPU_MAXID is not defined by machine/cpu.h.
This lets mips ports have additional machdep sysctl.  Define CPUISMIPS3
for MIPS1+MIPS2 as cpu_arch >= 3 to support mips4.  Add cpu_intr()
prototype so this is defined in one place.

diffstat:

 sys/arch/mips/include/cpu.h |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (44 lines):

diff -r 4a42b122b252 -r 776d85a0faaa sys/arch/mips/include/cpu.h
--- a/sys/arch/mips/include/cpu.h       Tue Jul 11 06:27:58 2000 +0000
+++ b/sys/arch/mips/include/cpu.h       Tue Jul 11 06:34:57 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.41 2000/05/30 02:05:36 nisimura Exp $        */
+/*     $NetBSD: cpu.h,v 1.42 2000/07/11 06:34:57 jeffs Exp $   */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -45,6 +45,7 @@
  * Exported definitions unique to NetBSD/mips cpu support.
  */
 
+#ifndef CPU_MAXID                      /* platform can override */
 /*
  * CTL_MACHDEP definitions.
  */
@@ -59,7 +60,7 @@
        { "booted_kernel", CTLTYPE_STRING }, \
        { "root_device", CTLTYPE_STRING }, \
 }
-
+#endif
 
 #ifdef _KERNEL
 #ifndef _LOCORE
@@ -80,7 +81,7 @@
 
 #else /* run-time test */
 extern int cpu_arch;
-#define CPUISMIPS3     (cpu_arch == 3)
+#define CPUISMIPS3     (cpu_arch >= 3)
 #endif /* run-time test */
 
 /*
@@ -90,6 +91,8 @@
 #define        cpu_wait(p)                     /* nothing */
 #define        cpu_swapout(p)                  panic("cpu_swapout: can't get here");
 
+void cpu_intr __P((u_int32_t, u_int32_t, u_int32_t, u_int32_t));
+
 /*
  * Arguments to hardclock and gatherstats encapsulate the previous
  * machine state in an opaque clockframe.



Home | Main Index | Thread Index | Old Index