Source-Changes-HG archive

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

[src/trunk]: src Now that 6.0 is branched, remove the ACPI-related sysctl nod...



details:   https://anonhg.NetBSD.org/src/rev/e0c5bd501048
branches:  trunk
changeset: 778720:e0c5bd501048
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Tue Apr 10 13:48:24 2012 +0000

description:
Now that 6.0 is branched, remove the ACPI-related sysctl nodes in machdep.

diffstat:

 share/man/man4/acpi.4           |   5 +++--
 sys/arch/x86/acpi/acpi_wakeup.c |  37 +++++++------------------------------
 sys/dev/acpi/acpi.c             |  24 +++---------------------
 3 files changed, 13 insertions(+), 53 deletions(-)

diffs (158 lines):

diff -r 51daf0147eb4 -r e0c5bd501048 share/man/man4/acpi.4
--- a/share/man/man4/acpi.4     Tue Apr 10 13:45:07 2012 +0000
+++ b/share/man/man4/acpi.4     Tue Apr 10 13:48:24 2012 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: acpi.4,v 1.74 2012/04/10 12:51:31 jruoho Exp $
+.\" $NetBSD: acpi.4,v 1.75 2012/04/10 13:48:24 jruoho Exp $
 .\"
 .\" Copyright (c) 2002, 2004, 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -133,8 +133,9 @@
 A boolean variable that controls whether the
 .Tn PC
 speaker beeps upon resume.
+Only available on i386 and amd64 architectures.
 .It Ic hw.acpi.sleep.vbios
-Defines the handling of the graphics card.
+Defines the handling of the graphics card on i386 and amd64 architectures.
 The supported values are:
 .Bl -tag -width '2' -offset 2n
 .It 0
diff -r 51daf0147eb4 -r e0c5bd501048 sys/arch/x86/acpi/acpi_wakeup.c
--- a/sys/arch/x86/acpi/acpi_wakeup.c   Tue Apr 10 13:45:07 2012 +0000
+++ b/sys/arch/x86/acpi/acpi_wakeup.c   Tue Apr 10 13:48:24 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acpi_wakeup.c,v 1.29 2011/07/01 18:22:39 dyoung Exp $  */
+/*     $NetBSD: acpi_wakeup.c,v 1.30 2012/04/10 13:48:24 jruoho Exp $  */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.c,v 1.29 2011/07/01 18:22:39 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.c,v 1.30 2012/04/10 13:48:24 jruoho Exp $");
 
 /*-
  * Copyright (c) 2001 Takanori Watanabe <takawata%jp.freebsd.org@localhost>
@@ -407,9 +407,9 @@
        pmap_update(pmap_kernel());
 }
 
-SYSCTL_SETUP(sysctl_md_acpi_setup, "acpi x86 sysctl setup")
+SYSCTL_SETUP(sysctl_md_acpi_setup, "ACPI x86 sysctl setup")
 {
-       const struct sysctlnode *rnode, *mnode;
+       const struct sysctlnode *rnode;
        int err;
 
        err = sysctl_createv(clog, 0, NULL, &rnode,
@@ -417,14 +417,14 @@
            NULL, NULL, 0, NULL, 0, CTL_HW, CTL_EOL);
 
        if (err != 0)
-               goto out;
+               return;
 
        err = sysctl_createv(clog, 0, &rnode, &rnode,
            CTLFLAG_PERMANENT, CTLTYPE_NODE, "acpi", NULL,
            NULL, 0, NULL, 0, CTL_CREATE, CTL_EOL);
 
        if (err != 0)
-               goto out;
+               return;
 
        err = sysctl_createv(clog, 0, &rnode, &rnode,
            CTLFLAG_PERMANENT, CTLTYPE_NODE,
@@ -432,7 +432,7 @@
            NULL, 0, NULL, 0, CTL_CREATE, CTL_EOL);
 
        if (err != 0)
-               goto out;
+               return;
 
        (void)sysctl_createv(NULL, 0, &rnode, NULL,
            CTLFLAG_READWRITE, CTLTYPE_BOOL, "beep",
@@ -443,29 +443,6 @@
            CTLFLAG_READWRITE, CTLTYPE_INT, "vbios",
            NULL, sysctl_md_acpi_vbios_reset,
            0, NULL, 0, CTL_CREATE, CTL_EOL);
-
-       /*
-        * All ACPI-specific sysctl(9) nodes are centralized
-        * under hw.acpi. The two variables below are provided
-        * for backwards compatibility.
-        */
-out:
-       err = sysctl_createv(NULL, 0, NULL, &mnode,
-           CTLFLAG_PERMANENT, CTLTYPE_NODE, "machdep",
-           NULL, NULL, 0, NULL, 0, CTL_MACHDEP, CTL_EOL);
-
-       if (err != 0)
-               return;
-
-       (void)sysctl_createv(NULL, 0, &mnode, NULL,
-           CTLFLAG_READWRITE, CTLTYPE_INT, "acpi_vbios_reset",
-           NULL, sysctl_md_acpi_vbios_reset,
-           0, NULL, 0, CTL_CREATE, CTL_EOL);
-
-       (void)sysctl_createv(NULL, 0, &mnode, NULL,
-           CTLFLAG_READWRITE, CTLTYPE_BOOL, "acpi_beep_on_reset",
-           NULL, sysctl_md_acpi_beep_on_reset,
-           0, NULL, 0, CTL_CREATE, CTL_EOL);
 }
 
 static int
diff -r 51daf0147eb4 -r e0c5bd501048 sys/dev/acpi/acpi.c
--- a/sys/dev/acpi/acpi.c       Tue Apr 10 13:45:07 2012 +0000
+++ b/sys/dev/acpi/acpi.c       Tue Apr 10 13:48:24 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acpi.c,v 1.252 2011/11/14 02:44:59 jmcneill Exp $      */
+/*     $NetBSD: acpi.c,v 1.253 2012/04/10 13:48:24 jruoho Exp $        */
 
 /*-
  * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -100,7 +100,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.252 2011/11/14 02:44:59 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.253 2012/04/10 13:48:24 jruoho Exp $");
 
 #include "opt_acpi.h"
 #include "opt_pcifixup.h"
@@ -1455,7 +1455,7 @@
  */
 SYSCTL_SETUP(sysctl_acpi_setup, "sysctl hw.acpi subtree setup")
 {
-       const struct sysctlnode *mnode, *rnode, *snode;
+       const struct sysctlnode *rnode, *snode;
        int err;
 
        err = sysctl_createv(clog, 0, NULL, &rnode,
@@ -1502,24 +1502,6 @@
            sysctl_hw_acpi_sleepstates, 0, NULL, 0,
            CTL_CREATE, CTL_EOL);
 
-       /*
-        * For the time being, machdep.sleep_state
-        * is provided for backwards compatibility.
-        */
-       err = sysctl_createv(NULL, 0, NULL, &mnode,
-           CTLFLAG_PERMANENT, CTLTYPE_NODE, "machdep",
-           NULL, NULL, 0, NULL, 0,
-           CTL_MACHDEP, CTL_EOL);
-
-       if (err == 0) {
-
-               (void)sysctl_createv(NULL, 0, &mnode, NULL,
-                   CTLFLAG_PERMANENT | CTLFLAG_READWRITE, CTLTYPE_INT,
-                   "sleep_state", SYSCTL_DESCR("System sleep state"),
-                   sysctl_hw_acpi_sleepstate, 0, NULL, 0,
-                   CTL_CREATE, CTL_EOL);
-       }
-
        err = sysctl_createv(clog, 0, &rnode, &rnode,
            CTLFLAG_PERMANENT, CTLTYPE_NODE,
            "stat", SYSCTL_DESCR("ACPI statistics"),



Home | Main Index | Thread Index | Old Index