Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/next68k/include include machine/intr.h only in the ...



details:   https://anonhg.NetBSD.org/src/rev/d339af8669f3
branches:  trunk
changeset: 584087:d339af8669f3
user:      drochner <drochner%NetBSD.org@localhost>
date:      Wed Sep 07 19:39:51 2005 +0000

description:
include machine/intr.h only in the _KERNEL case, as
most other ports do.
(In the -KERNEL case, it is needed because the spl*()
stuff ought to be pulled in by <sys/param.h> per the
manpages.)
This saves some namespace headaches.

diffstat:

 sys/arch/next68k/include/param.h |  15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diffs (45 lines):

diff -r e2843fbd8229 -r d339af8669f3 sys/arch/next68k/include/param.h
--- a/sys/arch/next68k/include/param.h  Wed Sep 07 19:35:37 2005 +0000
+++ b/sys/arch/next68k/include/param.h  Wed Sep 07 19:39:51 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.6 2005/01/19 01:58:21 chs Exp $    */
+/*     $NetBSD: param.h,v 1.7 2005/09/07 19:39:51 drochner Exp $       */
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -85,11 +85,6 @@
 #define        _MACHINE        next68k
 #define        MACHINE         "next68k"
 
-/*
- * Get interrupt glue.
- */
-#include <machine/intr.h>
-
 #define        PGSHIFT         12              /* LOG2(NBPG) */
 #define        KERNBASE        0x00000000      /* start of kernel virtual */
 
@@ -110,6 +105,9 @@
 
 #define        NPTEPG          (NBPG/(sizeof (pt_entry_t)))
 
+#ifdef _KERNEL
+#include <machine/intr.h>
+
 /*
  * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized
  * logical pages.
@@ -117,10 +115,11 @@
 #define        NKMEMPAGES_MIN_DEFAULT  ((4 * 1024 * 1024) >> PAGE_SHIFT)
 #define        NKMEMPAGES_MAX_DEFAULT  ((4 * 1024 * 1024) >> PAGE_SHIFT)
 
-#if defined(_KERNEL) && !defined(_LOCORE)
+#if !defined(_LOCORE)
 #define        delay(us)       _delay((us) << 8)
 #define DELAY(us)      delay(us)
 void   _delay(u_int);
-#endif /* _KERNEL && !_LOCORE */
+#endif /* !_LOCORE */
+#endif /* _KERNEL */
 
 #endif /* !_MACHINE_PARAM_H_ */



Home | Main Index | Thread Index | Old Index