Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/xen/xen Move xen.balloon to machdep in the sysctl(7...



details:   https://anonhg.NetBSD.org/src/rev/01b2f2196835
branches:  trunk
changeset: 767765:01b2f2196835
user:      jym <jym%NetBSD.org@localhost>
date:      Fri Jul 29 22:16:05 2011 +0000

description:
Move xen.balloon to machdep in the sysctl(7) tree. It does not really
belong to either kern or hw.

Rename machdep.xen_timepush_ticks to xen.timepush_ticks, so it can live
under the same tree as the balloon node, machdep.xen.

ok bouyer@.

diffstat:

 sys/arch/xen/xen/balloon.c |   8 ++++----
 sys/arch/xen/xen/clock.c   |  22 ++++++++++++++++------
 2 files changed, 20 insertions(+), 10 deletions(-)

diffs (74 lines):

diff -r 82109d342409 -r 01b2f2196835 sys/arch/xen/xen/balloon.c
--- a/sys/arch/xen/xen/balloon.c        Fri Jul 29 21:21:43 2011 +0000
+++ b/sys/arch/xen/xen/balloon.c        Fri Jul 29 22:16:05 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: balloon.c,v 1.9 2011/04/29 22:52:02 jym Exp $ */
+/* $NetBSD: balloon.c,v 1.10 2011/07/29 22:16:05 jym Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
 #define BALLOONDEBUG 0
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: balloon.c,v 1.9 2011/04/29 22:52:02 jym Exp $");
+__KERNEL_RCSID(0, "$NetBSD: balloon.c,v 1.10 2011/07/29 22:16:05 jym Exp $");
 
 #include <sys/inttypes.h>
 #include <sys/device.h>
@@ -773,9 +773,9 @@
 
        sysctl_createv(clog, 0, NULL, &node,
            CTLFLAG_PERMANENT,
-           CTLTYPE_NODE, "kern", NULL,
+           CTLTYPE_NODE, "machdep", NULL,
            NULL, 0, NULL, 0,
-           CTL_KERN, CTL_EOL);
+           CTL_MACHDEP, CTL_EOL);
 
        sysctl_createv(clog, 0, &node, &node,
            CTLFLAG_PERMANENT,
diff -r 82109d342409 -r 01b2f2196835 sys/arch/xen/xen/clock.c
--- a/sys/arch/xen/xen/clock.c  Fri Jul 29 21:21:43 2011 +0000
+++ b/sys/arch/xen/xen/clock.c  Fri Jul 29 22:16:05 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clock.c,v 1.54 2010/03/28 20:46:18 snj Exp $   */
+/*     $NetBSD: clock.c,v 1.55 2011/07/29 22:16:05 jym Exp $   */
 
 /*
  *
@@ -29,7 +29,7 @@
 #include "opt_xen.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.54 2010/03/28 20:46:18 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.55 2011/07/29 22:16:05 jym Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -416,11 +416,21 @@
 #ifdef DOM0OPS
        xen_timepush_ticks = 53 * hz + 3; /* avoid exact # of min/sec */
        if (xendomain_is_privileged()) {
-               sysctl_createv(NULL, 0, NULL, NULL, CTLFLAG_READWRITE,
-                   CTLTYPE_INT, "xen_timepush_ticks", SYSCTL_DESCR("How often"
-                   " to update the hypervisor's time-of-day; 0 to disable"),
+               const struct sysctlnode *node = NULL;
+
+               sysctl_createv(NULL, 0, NULL, &node, 0,
+                   CTLTYPE_NODE, "xen",
+                   SYSCTL_DESCR("Xen top level node"),
+                   NULL, 0, NULL, 0,
+                   CTL_MACHDEP, CTL_CREATE, CTL_EOL);
+
+               sysctl_createv(NULL, 0, &node, NULL, CTLFLAG_READWRITE,
+                   CTLTYPE_INT, "timepush_ticks",
+                   SYSCTL_DESCR("How often to update the hypervisor's "
+                   " time-of-day; 0 to disable"),
                    sysctl_xen_timepush, 0, &xen_timepush_ticks, 0, 
-                   CTL_MACHDEP, CTL_CREATE, CTL_EOL);
+                   CTL_CREATE, CTL_EOL);
+
                callout_reset(&xen_timepush_co, xen_timepush_ticks,
                    &xen_timepush, &xen_timepush_co);
        }



Home | Main Index | Thread Index | Old Index