Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Use a __HAVE_BOOTINFO_H define to check for bootinf...



details:   https://anonhg.NetBSD.org/src/rev/3d9a5372d669
branches:  trunk
changeset: 534871:3d9a5372d669
user:      simonb <simonb%NetBSD.org@localhost>
date:      Mon Aug 05 02:13:14 2002 +0000

description:
Use a __HAVE_BOOTINFO_H define to check for bootinfo support instead of
speading port names in arch-dependant code.

diffstat:

 sys/arch/mips/mips/mips_machdep.c |  16 ++++++++--------
 sys/arch/mipsco/include/types.h   |   5 ++++-
 sys/arch/newsmips/include/types.h |   4 +++-
 sys/arch/pmax/include/types.h     |   4 +++-
 sys/arch/sgimips/include/types.h  |   5 ++++-
 5 files changed, 22 insertions(+), 12 deletions(-)

diffs (108 lines):

diff -r 24ae576a8522 -r 3d9a5372d669 sys/arch/mips/mips/mips_machdep.c
--- a/sys/arch/mips/mips/mips_machdep.c Mon Aug 05 01:33:36 2002 +0000
+++ b/sys/arch/mips/mips/mips_machdep.c Mon Aug 05 02:13:14 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mips_machdep.c,v 1.141 2002/08/04 03:16:19 gmcgarry Exp $      */
+/*     $NetBSD: mips_machdep.c,v 1.142 2002/08/05 02:13:14 simonb Exp $        */
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -120,7 +120,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.141 2002/08/04 03:16:19 gmcgarry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.142 2002/08/05 02:13:14 simonb Exp $");
 
 #include "opt_cputype.h"
 #include "opt_compat_netbsd.h"
@@ -156,8 +156,8 @@
 #include <mips/pte.h>
 #include <machine/cpu.h>
 
-#if defined(__pmax__) || defined(__mipsco__) || defined(__sgimips__)
-#include <machine/bootinfo.h>          /* XXX pmax only so far */
+#ifdef __HAVE_BOOTINFO_H
+#include <machine/bootinfo.h>
 #endif
 
 #if defined(MIPS32) || defined(MIPS64)
@@ -1107,7 +1107,7 @@
        size_t newlen;
        struct proc *p;
 {
-#if defined(__pmax__)
+#ifdef __HAVE_BOOTINFO_H
        struct btinfo_bootpath *bibp;
 #endif
        dev_t consdev;
@@ -1124,10 +1124,10 @@
                        consdev = NODEV;
                return (sysctl_rdstruct(oldp, oldlenp, newp, &consdev,
                    sizeof consdev));
-#if defined(__pmax__) || defined(__mipsco__) || defined(__sgimips__)
+#ifdef __HAVE_BOOTINFO_H
        case CPU_BOOTED_KERNEL:
-               bibp = lookup_bootinfo(BTINFO_BOOTPATH);
-               if(!bibp)
+               bibp = lookup_bootinfo(BTINFO_BOOTPATH);
+               if (!bibp)
                        return (ENOENT); /* ??? */
                return (sysctl_rdstring(oldp, oldlenp, newp, bibp->bootpath));
 #endif
diff -r 24ae576a8522 -r 3d9a5372d669 sys/arch/mipsco/include/types.h
--- a/sys/arch/mipsco/include/types.h   Mon Aug 05 01:33:36 2002 +0000
+++ b/sys/arch/mipsco/include/types.h   Mon Aug 05 02:13:14 2002 +0000
@@ -1,5 +1,8 @@
-/*     $NetBSD: types.h,v 1.2 2001/03/31 00:08:34 wdk Exp $    */
+/*     $NetBSD: types.h,v 1.3 2002/08/05 02:13:15 simonb Exp $ */
 
 #include <mips/types.h>
 
 #define        __HAVE_GENERIC_SOFT_INTERRUPTS
+
+/* MIPS specific options */
+#define        __HAVE_BOOTINFO_H
diff -r 24ae576a8522 -r 3d9a5372d669 sys/arch/newsmips/include/types.h
--- a/sys/arch/newsmips/include/types.h Mon Aug 05 01:33:36 2002 +0000
+++ b/sys/arch/newsmips/include/types.h Mon Aug 05 02:13:14 2002 +0000
@@ -1,7 +1,9 @@
-/*     $NetBSD: types.h,v 1.4 2002/03/05 16:13:57 simonb Exp $ */
+/*     $NetBSD: types.h,v 1.5 2002/08/05 02:13:15 simonb Exp $ */
 
 #include <mips/types.h>
 
 #define        __BROKEN_CONFIG_UNIT_USAGE
 
+/* MIPS specific options */
+#define        __HAVE_BOOTINFO_H
 #define        __HAVE_MIPS_MACHDEP_CACHE_CONFIG
diff -r 24ae576a8522 -r 3d9a5372d669 sys/arch/pmax/include/types.h
--- a/sys/arch/pmax/include/types.h     Mon Aug 05 01:33:36 2002 +0000
+++ b/sys/arch/pmax/include/types.h     Mon Aug 05 02:13:14 2002 +0000
@@ -1,8 +1,10 @@
-/*     $NetBSD: types.h,v 1.20 2002/03/05 16:14:28 simonb Exp $        */
+/*     $NetBSD: types.h,v 1.21 2002/08/05 02:13:15 simonb Exp $        */
 
 #include <mips/types.h>
 
 #define        __HAVE_DEVICE_REGISTER
 #define        __HAVE_GENERIC_SOFT_INTERRUPTS
 
+/* MIPS specific options */
+#define        __HAVE_BOOTINFO_H
 #define        __HAVE_MIPS_MACHDEP_CACHE_CONFIG
diff -r 24ae576a8522 -r 3d9a5372d669 sys/arch/sgimips/include/types.h
--- a/sys/arch/sgimips/include/types.h  Mon Aug 05 01:33:36 2002 +0000
+++ b/sys/arch/sgimips/include/types.h  Mon Aug 05 02:13:14 2002 +0000
@@ -1,6 +1,9 @@
-/*     $NetBSD: types.h,v 1.3 2001/10/18 02:19:54 mhitch Exp $ */
+/*     $NetBSD: types.h,v 1.4 2002/08/05 02:13:15 simonb Exp $ */
 
 #include <mips/types.h>
 
 #define        __HAVE_DEVICE_REGISTER
 #define        __HAVE_GENERIC_SOFT_INTERRUPTS
+
+/* MIPS specific options */
+#define        __HAVE_BOOTINFO_H



Home | Main Index | Thread Index | Old Index