Module Name:    src
Committed By:   jym
Date:           Fri Jul 29 22:16:05 UTC 2011

Modified Files:
        src/sys/arch/xen/xen: balloon.c clock.c

Log Message:
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@.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/xen/xen/balloon.c
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/xen/xen/clock.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/xen/xen/balloon.c
diff -u src/sys/arch/xen/xen/balloon.c:1.9 src/sys/arch/xen/xen/balloon.c:1.10
--- src/sys/arch/xen/xen/balloon.c:1.9	Fri Apr 29 22:52:02 2011
+++ src/sys/arch/xen/xen/balloon.c	Fri Jul 29 22:16:05 2011
@@ -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,

Index: src/sys/arch/xen/xen/clock.c
diff -u src/sys/arch/xen/xen/clock.c:1.54 src/sys/arch/xen/xen/clock.c:1.55
--- src/sys/arch/xen/xen/clock.c:1.54	Sun Mar 28 20:46:18 2010
+++ src/sys/arch/xen/xen/clock.c	Fri Jul 29 22:16:05 2011
@@ -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"),
-		    sysctl_xen_timepush, 0, &xen_timepush_ticks, 0, 
+		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_CREATE, CTL_EOL);
+
 		callout_reset(&xen_timepush_co, xen_timepush_ticks,
 		    &xen_timepush, &xen_timepush_co);
 	}

Reply via email to