On Tue, Jul 11, 2017 at 11:19:17PM +0200, Martin Natano wrote:
> Go ahead replacing machdep.lidsuspend with cpu.lidaction. OpenBSD 6.1

cpu.lidaction or machdep.lidaction?

> contains both MIBs, so there is a clear path for migration.
> 
> ok?
> 
> natano
> 
> 
> Index: arch/amd64/amd64/machdep.c
> ===================================================================
> RCS file: /cvs/src/sys/arch/amd64/amd64/machdep.c,v
> retrieving revision 1.230
> diff -u -p -r1.230 machdep.c
> --- arch/amd64/amd64/machdep.c        29 Jun 2017 07:19:40 -0000      1.230
> +++ arch/amd64/amd64/machdep.c        11 Jul 2017 20:44:44 -0000
> @@ -476,7 +476,6 @@ cpu_sysctl(int *name, u_int namelen, voi
>  #endif
>       case CPU_XCRYPT:
>               return (sysctl_rdint(oldp, oldlenp, newp, amd64_has_xcrypt));
> -     case CPU_LIDSUSPEND:
>       case CPU_LIDACTION:
>               val = lid_action;
>               error = sysctl_int(oldp, oldlenp, newp, newlen, &val);
> Index: arch/amd64/include/cpu.h
> ===================================================================
> RCS file: /cvs/src/sys/arch/amd64/include/cpu.h,v
> retrieving revision 1.112
> diff -u -p -r1.112 cpu.h
> --- arch/amd64/include/cpu.h  20 Jun 2017 05:34:41 -0000      1.112
> +++ arch/amd64/include/cpu.h  11 Jul 2017 20:47:07 -0000
> @@ -427,7 +427,6 @@ void mp_setperf_init(void);
>  #define CPU_KBDRESET         10      /* keyboard reset under pcvt */
>  #define CPU_APMHALT          11      /* halt -p hack */
>  #define CPU_XCRYPT           12      /* supports VIA xcrypt in userland */
> -#define CPU_LIDSUSPEND               13      /* lid close causes a suspend */
>  #define CPU_LIDACTION                14      /* action caused by lid close */
>  #define CPU_FORCEUKBD                15      /* Force ukbd(4) as console 
> keyboard */
>  #define CPU_MAXID            16      /* number of valid machdep ids */
> @@ -446,7 +445,7 @@ void mp_setperf_init(void);
>       { "kbdreset", CTLTYPE_INT }, \
>       { "apmhalt", CTLTYPE_INT }, \
>       { "xcrypt", CTLTYPE_INT }, \
> -     { "lidsuspend", CTLTYPE_INT }, \
> +     { 0, 0 }, \
>       { "lidaction", CTLTYPE_INT }, \
>       { "forceukbd", CTLTYPE_INT }, \
>  }
> Index: arch/arm/include/cpu.h
> ===================================================================
> RCS file: /cvs/src/sys/arch/arm/include/cpu.h,v
> retrieving revision 1.46
> diff -u -p -r1.46 cpu.h
> --- arch/arm/include/cpu.h    27 Apr 2017 22:41:46 -0000      1.46
> +++ arch/arm/include/cpu.h    11 Jul 2017 20:48:38 -0000
> @@ -65,7 +65,7 @@
>               /*              9          formerly int: CPU_ZTSRAWMODE */
>               /*              10         formerly struct: CPU_ZTSSCALE */
>  #define      CPU_MAXSPEED            11      /* int: number of valid machdep 
> ids */
> -#define CPU_LIDSUSPEND               12      /* int: closing lid causes 
> suspend */
> +             /*              12         formerly int: CPU_LIDSUSPEND */
>  #define CPU_LIDACTION                13      /* action caused by lid close */
>  #define      CPU_MAXID               14      /* number of valid machdep ids 
> */
>  
> @@ -82,7 +82,7 @@
>       { 0, 0 }, \
>       { 0, 0 }, \
>       { "maxspeed", CTLTYPE_INT }, \
> -     { "lidsuspend", CTLTYPE_INT }, \
> +     { 0, 0 }, \
>       { "lidaction", CTLTYPE_INT }, \
>  }
>  
> Index: arch/i386/i386/machdep.c
> ===================================================================
> RCS file: /cvs/src/sys/arch/i386/i386/machdep.c,v
> retrieving revision 1.603
> diff -u -p -r1.603 machdep.c
> --- arch/i386/i386/machdep.c  29 Jun 2017 07:11:24 -0000      1.603
> +++ arch/i386/i386/machdep.c  11 Jul 2017 20:50:33 -0000
> @@ -3550,7 +3550,6 @@ cpu_sysctl(int *name, u_int namelen, voi
>               return (sysctl_rdint(oldp, oldlenp, newp, i386_has_sse2));
>       case CPU_XCRYPT:
>               return (sysctl_rdint(oldp, oldlenp, newp, i386_has_xcrypt));
> -     case CPU_LIDSUSPEND:
>       case CPU_LIDACTION:
>               val = lid_action;
>               error = sysctl_int(oldp, oldlenp, newp, newlen, &val);
> Index: arch/i386/include/cpu.h
> ===================================================================
> RCS file: /cvs/src/sys/arch/i386/include/cpu.h,v
> retrieving revision 1.155
> diff -u -p -r1.155 cpu.h
> --- arch/i386/include/cpu.h   16 Mar 2017 10:02:03 -0000      1.155
> +++ arch/i386/include/cpu.h   11 Jul 2017 20:46:11 -0000
> @@ -523,7 +523,6 @@ int       cpu_paenable(void *);
>  #define CPU_SSE                      14      /* supports SSE */
>  #define CPU_SSE2             15      /* supports SSE2 */
>  #define CPU_XCRYPT           16      /* supports VIA xcrypt in userland */
> -#define CPU_LIDSUSPEND               17      /* lid close causes a suspend */
>  #define CPU_LIDACTION                18      /* action caused by lid close */
>  #define CPU_FORCEUKBD                19      /* Force ukbd(4) as console 
> keyboard */
>  #define CPU_MAXID            20      /* number of valid machdep ids */
> @@ -546,7 +545,7 @@ int       cpu_paenable(void *);
>       { "sse", CTLTYPE_INT }, \
>       { "sse2", CTLTYPE_INT }, \
>       { "xcrypt", CTLTYPE_INT }, \
> -     { "lidsuspend", CTLTYPE_INT }, \
> +     { 0, 0 }, \
>       { "lidaction", CTLTYPE_INT }, \
>       { "forceukbd", CTLTYPE_INT }, \
>  }
> Index: arch/loongson/loongson/machdep.c
> ===================================================================
> RCS file: /cvs/src/sys/arch/loongson/loongson/machdep.c,v
> retrieving revision 1.78
> diff -u -p -r1.78 machdep.c
> --- arch/loongson/loongson/machdep.c  21 May 2017 13:00:53 -0000      1.78
> +++ arch/loongson/loongson/machdep.c  11 Jul 2017 20:50:42 -0000
> @@ -1028,7 +1028,6 @@ cpu_sysctl(int *name, u_int namelen, voi
>               return ENOTDIR;         /* Overloaded */
>  
>       switch (name[0]) {
> -     case CPU_LIDSUSPEND:
>       case CPU_LIDACTION:
>               val = lid_action;
>               error = sysctl_int(oldp, oldlenp, newp, newlen, &val);
> Index: arch/mips64/include/cpu.h
> ===================================================================
> RCS file: /cvs/src/sys/arch/mips64/include/cpu.h,v
> retrieving revision 1.118
> diff -u -p -r1.118 cpu.h
> --- arch/mips64/include/cpu.h 11 Jun 2017 03:35:30 -0000      1.118
> +++ arch/mips64/include/cpu.h 11 Jul 2017 20:49:29 -0000
> @@ -364,7 +364,7 @@ void      cp0_calibrate(struct cpu_info *);
>   */
>  #define      CPU_ALLOWAPERTURE       1       /* allow mmap of /dev/xf86 */
>               /*              2          formerly: keyboard reset */
> -#define      CPU_LIDSUSPEND          3       /* lid close causes a suspend */
> +             /*              3          formerly: CPU_LIDSUSPEND */
>  #define CPU_LIDACTION                4       /* action caused by lid close */
>  #define      CPU_MAXID               5       /* number of valid machdep ids 
> */
>  
> @@ -372,7 +372,7 @@ void      cp0_calibrate(struct cpu_info *);
>       { 0, 0 },                               \
>       { "allowaperture", CTLTYPE_INT },       \
>       { 0, 0 },                               \
> -     { "lidsuspend", CTLTYPE_INT },          \
> +     { 0, 0 },                               \
>       { "lidaction", CTLTYPE_INT },           \
>  }
>  
> 

Reply via email to