Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm - Cleanup for dynamic sysctl:



details:   https://anonhg.NetBSD.org/src/rev/aa59a5bfac21
branches:  trunk
changeset: 992268:aa59a5bfac21
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Wed Aug 22 01:05:21 2018 +0000

description:
- Cleanup for dynamic sysctl:
  - Remove unused *_NAMES macros for sysctl.
  - Remove unused *_MAXID for sysctls.
- Move CTL_MACHDEP sysctl definitions for m68k into m68k/include/cpu.h and
  use them on all m68k machines.

diffstat:

 distrib/sets/lists/comp/ad.m68k            |    4 +-
 sys/arch/alpha/include/cpu.h               |    3 +-
 sys/arch/amiga/include/cpu.h               |   11 +-
 sys/arch/arm/include/cpu.h                 |    3 +-
 sys/arch/atari/include/cpu.h               |   10 +-
 sys/arch/cesfic/include/cpu.h              |   12 +-
 sys/arch/evbcf/include/cpu.h               |   11 +-
 sys/arch/hp300/include/cpu.h               |   11 +-
 sys/arch/hppa/include/cpu.h                |    3 +-
 sys/arch/luna68k/include/cpu.h             |    8 +-
 sys/arch/m68k/include/Makefile             |    3 +-
 sys/arch/m68k/include/cpu.h                |    7 +-
 sys/arch/m68k/include/sysctl.h             |   15 --
 sys/arch/mac68k/include/cpu.h              |    5 +-
 sys/arch/mips/include/cpu.h                |   10 +-
 sys/arch/mvme68k/include/cpu.h             |   11 +-
 sys/arch/news68k/include/cpu.h             |   15 +--
 sys/arch/powerpc/include/cpu.h             |    3 +-
 sys/arch/sh3/include/cpu.h                 |    3 +-
 sys/arch/sparc/include/cpu.h               |    3 +-
 sys/arch/sparc64/include/cpu.h             |    3 +-
 sys/arch/vax/include/cpu.h                 |    3 +-
 sys/arch/x68k/include/cpu.h                |   11 +-
 sys/arch/x86/include/cpu.h                 |    4 +-
 sys/compat/linux/common/linux_exec.h       |   16 +--
 sys/compat/linux32/common/linux32_sysctl.h |   16 +--
 sys/fs/cd9660/cd9660_extern.h              |    8 +-
 sys/kern/init_sysctl.c                     |    6 +-
 sys/net/if.h                               |   23 +--
 sys/netinet/dccp_var.h                     |   10 +-
 sys/netinet/icmp6.h                        |   31 +----
 sys/netinet/icmp_var.h                     |   15 +--
 sys/netinet/in.h                           |  139 +--------------------
 sys/netinet/ip_carp.h                      |   10 +-
 sys/netinet/pim_var.h                      |    8 +-
 sys/netinet/sctp_var.h                     |   66 +---------
 sys/netinet/tcp_var.h                      |   41 +-----
 sys/netinet/udp_var.h                      |   12 +-
 sys/netinet6/in6.h                         |  103 +---------------
 sys/netinet6/pim6_var.h                    |    7 +-
 sys/netinet6/raw_ip6.h                     |    8 +-
 sys/netinet6/udp6_var.h                    |   11 +-
 sys/netipsec/ipsec_var.h                   |    3 +-
 sys/nfs/nfs.h                              |    9 +-
 sys/sys/mbuf.h                             |   14 +-
 sys/sys/mount.h                            |   42 +------
 sys/sys/pipe.h                             |   12 +-
 sys/sys/socket.h                           |   48 +------
 sys/sys/sysctl.h                           |  197 +----------------------------
 sys/ufs/ffs/ffs_extern.h                   |    3 +-
 sys/ufs/lfs/lfs_extern.h                   |    3 +-
 sys/uvm/uvm_param.h                        |   26 +---
 52 files changed, 64 insertions(+), 995 deletions(-)

diffs (truncated from 1912 to 300 lines):

diff -r 2d496215aea4 -r aa59a5bfac21 distrib/sets/lists/comp/ad.m68k
--- a/distrib/sets/lists/comp/ad.m68k   Tue Aug 21 23:34:56 2018 +0000
+++ b/distrib/sets/lists/comp/ad.m68k   Wed Aug 22 01:05:21 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ad.m68k,v 1.56 2018/07/12 10:46:40 maxv Exp $
+# $NetBSD: ad.m68k,v 1.57 2018/08/22 01:05:21 msaitoh Exp $
 ./usr/bin/elf2aout                             comp-sysutil-bin
 ./usr/include/gcc-4.8/math-68881.h             comp-c-include          obsolete
 ./usr/include/gcc-4.8/tgmath.h                 comp-c-include          obsolete
@@ -60,7 +60,7 @@
 ./usr/include/m68k/stdarg.h                    comp-obsolete           obsolete
 ./usr/include/m68k/svr4_machdep.h              comp-obsolete           obsolete
 ./usr/include/m68k/sync_icache.h               comp-c-include
-./usr/include/m68k/sysctl.h                    comp-c-include
+./usr/include/m68k/sysctl.h                    comp-c-include          obsolete
 ./usr/include/m68k/trap.h                      comp-c-include
 ./usr/include/m68k/types.h                     comp-c-include
 ./usr/include/m68k/varargs.h                   comp-obsolete           obsolete
diff -r 2d496215aea4 -r aa59a5bfac21 sys/arch/alpha/include/cpu.h
--- a/sys/arch/alpha/include/cpu.h      Tue Aug 21 23:34:56 2018 +0000
+++ b/sys/arch/alpha/include/cpu.h      Wed Aug 22 01:05:21 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.83 2016/12/17 14:36:29 flxd Exp $ */
+/* $NetBSD: cpu.h,v 1.84 2018/08/22 01:05:21 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -238,7 +238,6 @@
 #define        CPU_UNALIGNED_SIGBUS    5       /* int: SIGBUS unaligned accesses */
 #define        CPU_BOOTED_KERNEL       6       /* string: booted kernel name */
 #define        CPU_FP_SYNC_COMPLETE    7       /* int: always fixup sync fp traps */
-#define        CPU_MAXID               8       /* 7 valid machdep IDs */
 
 #ifdef _KERNEL
 
diff -r 2d496215aea4 -r aa59a5bfac21 sys/arch/amiga/include/cpu.h
--- a/sys/arch/amiga/include/cpu.h      Tue Aug 21 23:34:56 2018 +0000
+++ b/sys/arch/amiga/include/cpu.h      Wed Aug 22 01:05:21 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.81 2016/12/17 14:36:29 flxd Exp $    */
+/*     $NetBSD: cpu.h,v 1.82 2018/08/22 01:05:21 msaitoh Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -116,15 +116,6 @@
 
 extern int machineid;
 
-#endif /* _KERNEL */
-
-/*
- * CTL_MACHDEP definitions.
- */
-#define CPU_CONSDEV    1       /* dev_t: console terminal device */
-#define CPU_MAXID      2       /* number of valid machdep ids */
-
-#ifdef _KERNEL
 /*
  * Prototypes from amiga_init.c
  */
diff -r 2d496215aea4 -r aa59a5bfac21 sys/arch/arm/include/cpu.h
--- a/sys/arch/arm/include/cpu.h        Tue Aug 21 23:34:56 2018 +0000
+++ b/sys/arch/arm/include/cpu.h        Wed Aug 22 01:05:21 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.96 2018/04/01 04:35:04 ryo Exp $     */
+/*     $NetBSD: cpu.h,v 1.97 2018/08/22 01:05:22 msaitoh Exp $ */
 
 /*
  * Copyright (c) 1994-1996 Mark Brinicombe.
@@ -60,7 +60,6 @@
 #define        CPU_BOOTED_KERNEL       3       /* string: kernel we booted */
 #define        CPU_CONSDEV             4       /* struct: dev_t of our console */
 #define        CPU_POWERSAVE           5       /* int: use CPU powersave mode */
-#define        CPU_MAXID               6       /* number of valid machdep ids */
 
 #if defined(_KERNEL) || defined(_KMEMUSER)
 
diff -r 2d496215aea4 -r aa59a5bfac21 sys/arch/atari/include/cpu.h
--- a/sys/arch/atari/include/cpu.h      Tue Aug 21 23:34:56 2018 +0000
+++ b/sys/arch/atari/include/cpu.h      Wed Aug 22 01:05:21 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.70 2013/10/19 19:20:59 christos Exp $        */
+/*     $NetBSD: cpu.h,v 1.71 2018/08/22 01:05:22 msaitoh Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -139,16 +139,8 @@
 
 #if defined(_KERNEL)
 extern int machineid;
-#endif /* _KERNEL */
 
 /*
- * CTL_MACHDEP definitions.
- */
-#define CPU_CONSDEV    1       /* dev_t: console terminal device */
-#define CPU_MAXID      2       /* number of valid machdep ids */
-
-#ifdef _KERNEL
-/*
  * Prototypes from atari_init.c
  */
 int    cpu_dump(int (*)(dev_t, daddr_t, void *, size_t), daddr_t *);
diff -r 2d496215aea4 -r aa59a5bfac21 sys/arch/cesfic/include/cpu.h
--- a/sys/arch/cesfic/include/cpu.h     Tue Aug 21 23:34:56 2018 +0000
+++ b/sys/arch/cesfic/include/cpu.h     Wed Aug 22 01:05:21 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.30 2016/12/17 14:36:29 flxd Exp $    */
+/*     $NetBSD: cpu.h,v 1.31 2018/08/22 01:05:22 msaitoh Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -102,16 +102,6 @@
 extern int astpending;         /* need to trap before returning to user mode */
 #define aston() (astpending++)
 
-#endif /* _KERNEL */
-
-/*
- * CTL_MACHDEP definitions.
- */
-#define        CPU_CONSDEV             1       /* dev_t: console terminal device */
-#define        CPU_MAXID               2       /* number of valid machdep ids */
-
-#ifdef _KERNEL
-
 #ifndef M68040
 #define        M68040
 #endif /* ! M68040 */
diff -r 2d496215aea4 -r aa59a5bfac21 sys/arch/evbcf/include/cpu.h
--- a/sys/arch/evbcf/include/cpu.h      Tue Aug 21 23:34:56 2018 +0000
+++ b/sys/arch/evbcf/include/cpu.h      Wed Aug 22 01:05:21 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.3 2016/12/17 14:36:29 flxd Exp $     */
+/*     $NetBSD: cpu.h,v 1.4 2018/08/22 01:05:22 msaitoh Exp $  */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -106,15 +106,6 @@
 extern int astpending;         /* need to trap before returning to user mode */
 #define aston() (astpending++)
 
-#endif /* _KERNEL */
-
-/*
- * CTL_MACHDEP definitions.
- */
-#define        CPU_CONSDEV             1       /* dev_t: console terminal device */
-#define        CPU_MAXID               2       /* number of valid machdep ids */
-
-#ifdef _KERNEL
 /*
  * Associate MVME models with CPU types.
  */
diff -r 2d496215aea4 -r aa59a5bfac21 sys/arch/hp300/include/cpu.h
--- a/sys/arch/hp300/include/cpu.h      Tue Aug 21 23:34:56 2018 +0000
+++ b/sys/arch/hp300/include/cpu.h      Wed Aug 22 01:05:21 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.69 2016/12/17 14:36:29 flxd Exp $    */
+/*     $NetBSD: cpu.h,v 1.70 2018/08/22 01:05:22 msaitoh Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -111,20 +111,11 @@
 extern int astpending;         /* need to trap before returning to user mode */
 #define aston() (astpending++)
 
-#endif /* _KERNEL */
-
-/*
- * CTL_MACHDEP definitions.
- */
-#define        CPU_CONSDEV             1       /* dev_t: console terminal device */
-#define        CPU_MAXID               2       /* number of valid machdep ids */
-
 /*
  * The rest of this should probably be moved to <machine/hp300spu.h>,
  * although some of it could probably be put into generic 68k headers.
  */
 
-#ifdef _KERNEL
 extern uint8_t *intiobase, *intiolimit, *extiobase;
 extern void (*vectab[])(void);
 
diff -r 2d496215aea4 -r aa59a5bfac21 sys/arch/hppa/include/cpu.h
--- a/sys/arch/hppa/include/cpu.h       Tue Aug 21 23:34:56 2018 +0000
+++ b/sys/arch/hppa/include/cpu.h       Wed Aug 22 01:05:21 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.3 2016/01/25 18:14:40 christos Exp $ */
+/*     $NetBSD: cpu.h,v 1.4 2018/08/22 01:05:22 msaitoh Exp $  */
 
 /*     $OpenBSD: cpu.h,v 1.55 2008/07/23 17:39:35 kettenis Exp $       */
 
@@ -422,7 +422,6 @@
 #define        CPU_CONSDEV             1       /* dev_t: console terminal device */
 #define        CPU_BOOTED_KERNEL       2       /* string: booted kernel name */
 #define        CPU_LCD_BLINK           3       /* int: twiddle heartbeat LED/LCD */
-#define        CPU_MAXID               4       /* number of valid machdep ids */
 
 #ifdef _KERNEL
 #include <sys/queue.h>
diff -r 2d496215aea4 -r aa59a5bfac21 sys/arch/luna68k/include/cpu.h
--- a/sys/arch/luna68k/include/cpu.h    Tue Aug 21 23:34:56 2018 +0000
+++ b/sys/arch/luna68k/include/cpu.h    Wed Aug 22 01:05:21 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.34 2017/06/16 18:17:41 jdolecek Exp $ */
+/* $NetBSD: cpu.h,v 1.35 2018/08/22 01:05:22 msaitoh Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -106,12 +106,6 @@
 #endif /* _KERNEL */
 
 /*
- * CTL_MACHDEP definitions.
- */
-#define CPU_CONSDEV            1       /* dev_t: console terminal device */
-#define CPU_MAXID              2       /* number of valid machdep ids */
-
-/*
  * Values for machtype
  */
 #define LUNA_I         1
diff -r 2d496215aea4 -r aa59a5bfac21 sys/arch/m68k/include/Makefile
--- a/sys/arch/m68k/include/Makefile    Tue Aug 21 23:34:56 2018 +0000
+++ b/sys/arch/m68k/include/Makefile    Wed Aug 22 01:05:21 2018 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.30 2018/07/12 10:46:45 maxv Exp $
+#      $NetBSD: Makefile,v 1.31 2018/08/22 01:05:22 msaitoh Exp $
 
 INCSDIR= /usr/include/m68k
 
@@ -16,7 +16,6 @@
        param.h pmap_motorola.h pcb.h proc.h profile.h \
        psl.h pte_motorola.h ptrace.h \
        reg.h rwlock.h setjmp.h signal.h sync_icache.h \
-       sysctl.h \
        trap.h types.h \
        wchar_limits.h
 
diff -r 2d496215aea4 -r aa59a5bfac21 sys/arch/m68k/include/cpu.h
--- a/sys/arch/m68k/include/cpu.h       Tue Aug 21 23:34:56 2018 +0000
+++ b/sys/arch/m68k/include/cpu.h       Wed Aug 22 01:05:21 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.15 2011/09/19 19:17:05 rkujawa Exp $ */
+/*     $NetBSD: cpu.h,v 1.16 2018/08/22 01:05:22 msaitoh Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -162,6 +162,11 @@
 #define CACHELINE_SIZE 16
 #define CACHELINE_MASK (CACHELINE_SIZE - 1)
 
+/* CTL_MACHDEP definitions. (Common to all m68k ports.) */
+#define        CPU_CONSDEV             1       /* dev_t: console terminal device */
+#define        CPU_ROOT_DEVICE         2       /* string: root device name */
+#define        CPU_BOOTED_KERNEL       3       /* string: booted kernel name */
+
 #if defined(_KERNEL) || defined(_KMEMUSER)
 #include <sys/cpu_data.h>
 
diff -r 2d496215aea4 -r aa59a5bfac21 sys/arch/m68k/include/sysctl.h
--- a/sys/arch/m68k/include/sysctl.h    Tue Aug 21 23:34:56 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-/*     $NetBSD: sysctl.h,v 1.2 2008/02/27 18:26:15 xtraeme Exp $       */
-
-/*
- * CTL_MACHDEP definitions.  (Common to all m68k ports.)
- * This should be included by each m68k port's cpu.h so
- * /usr/sbin/sysctl can be shared on all of them.
- */
-#ifndef CTL_MACHDEP_NAMES
-
-#define        CPU_CONSDEV             1       /* dev_t: console terminal device */
-#define        CPU_ROOT_DEVICE         2       /* string: root device name */
-#define        CPU_BOOTED_KERNEL       3       /* string: booted kernel name */
-#define        CPU_MAXID               4       /* number of valid machdep ids */
-
-#endif /* CTL_MACHDEP_NAMES */
diff -r 2d496215aea4 -r aa59a5bfac21 sys/arch/mac68k/include/cpu.h
--- a/sys/arch/mac68k/include/cpu.h     Tue Aug 21 23:34:56 2018 +0000
+++ b/sys/arch/mac68k/include/cpu.h     Wed Aug 22 01:05:21 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.99 2016/12/17 14:36:29 flxd Exp $    */
+/*     $NetBSD: cpu.h,v 1.100 2018/08/22 01:05:22 msaitoh Exp $        */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -123,9 +123,6 @@
 
 #endif /* _KERNEL */
 
-#define CPU_CONSDEV    1
-#define CPU_MAXID      2
-
 /* values for machineid --
  *     These are equivalent to the MacOS Gestalt values. */
 #define MACH_MACII             6
diff -r 2d496215aea4 -r aa59a5bfac21 sys/arch/mips/include/cpu.h



Home | Main Index | Thread Index | Old Index