Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mips Add sysctl variable to represent native CPU su...



details:   https://anonhg.NetBSD.org/src/rev/e22e3e0b5628
branches:  trunk
changeset: 534828:e22e3e0b5628
user:      gmcgarry <gmcgarry%NetBSD.org@localhost>
date:      Sun Aug 04 01:47:15 2002 +0000

description:
Add sysctl variable to represent native CPU support for LL/SC instructions.

diffstat:

 sys/arch/mips/include/cpu.h       |  4 +++-
 sys/arch/mips/mips/mips_machdep.c |  6 ++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diffs (52 lines):

diff -r e0f98ba2fa62 -r e22e3e0b5628 sys/arch/mips/include/cpu.h
--- a/sys/arch/mips/include/cpu.h       Sun Aug 04 01:43:03 2002 +0000
+++ b/sys/arch/mips/include/cpu.h       Sun Aug 04 01:47:15 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.65 2002/06/23 20:36:36 manu Exp $    */
+/*     $NetBSD: cpu.h,v 1.66 2002/08/04 01:47:17 gmcgarry Exp $        */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -95,6 +95,7 @@
 #define CPU_CONSDEV            1       /* dev_t: console terminal device */
 #define CPU_BOOTED_KERNEL      2       /* string: booted kernel name */
 #define CPU_ROOT_DEVICE                3       /* string: root device name */
+#define CPU_LLSC               4       /* OS/CPU supports LL/SC instruction */
 
 /*
  * Platform can override, but note this breaks userland compatibility
@@ -108,6 +109,7 @@
        { "console_device", CTLTYPE_STRUCT }, \
        { "booted_kernel", CTLTYPE_STRING }, \
        { "root_device", CTLTYPE_STRING }, \
+       { "llsc", CTLTYPE_INT }, \
 }
 #endif
 
diff -r e0f98ba2fa62 -r e22e3e0b5628 sys/arch/mips/mips/mips_machdep.c
--- a/sys/arch/mips/mips/mips_machdep.c Sun Aug 04 01:43:03 2002 +0000
+++ b/sys/arch/mips/mips/mips_machdep.c Sun Aug 04 01:47:15 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mips_machdep.c,v 1.138 2002/08/04 01:43:03 gmcgarry Exp $      */
+/*     $NetBSD: mips_machdep.c,v 1.139 2002/08/04 01:47:15 gmcgarry 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.138 2002/08/04 01:43:03 gmcgarry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.139 2002/08/04 01:47:15 gmcgarry Exp $");
 
 #include "opt_cputype.h"
 #include "opt_compat_netbsd.h"
@@ -1132,6 +1132,8 @@
                        return (ENOENT); /* ??? */
                return (sysctl_rdstring(oldp, oldlenp, newp, bibp->bootpath));
 #endif
+       case CPU_LLSC:
+               return (sysctl_rdint(oldp, oldlenp, newp, MIPS_HAS_LLSC));
        case CPU_ROOT_DEVICE:
        default:
                return (EOPNOTSUPP);



Home | Main Index | Thread Index | Old Index