Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/xen Merge the content of xen_debug.c into xen_machd...



details:   https://anonhg.NetBSD.org/src/rev/51779f1bf671
branches:  trunk
changeset: 834082:51779f1bf671
user:      maxv <maxv%NetBSD.org@localhost>
date:      Thu Jul 26 15:38:26 2018 +0000

description:
Merge the content of xen_debug.c into xen_machdep.c, there is only one
function.

diffstat:

 sys/arch/xen/conf/files.xen    |   3 +-
 sys/arch/xen/include/xen.h     |   5 +--
 sys/arch/xen/xen/xen_debug.c   |  76 ------------------------------------------
 sys/arch/xen/xen/xen_machdep.c |  19 +++++++++-
 4 files changed, 19 insertions(+), 84 deletions(-)

diffs (158 lines):

diff -r 9a148882608e -r 51779f1bf671 sys/arch/xen/conf/files.xen
--- a/sys/arch/xen/conf/files.xen       Thu Jul 26 15:26:10 2018 +0000
+++ b/sys/arch/xen/conf/files.xen       Thu Jul 26 15:38:26 2018 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.xen,v 1.169 2018/05/23 07:45:35 maxv Exp $
+#      $NetBSD: files.xen,v 1.170 2018/07/26 15:38:26 maxv Exp $
 #      NetBSD: files.x86,v 1.10 2003/10/08 17:30:00 bouyer Exp 
 #      NetBSD: files.i386,v 1.254 2004/03/25 23:32:10 jmc Exp 
 
@@ -98,7 +98,6 @@
 
 
 file   arch/xen/xen/xen_machdep.c
-file   arch/xen/xen/xen_debug.c
 
 file   arch/xen/xen/clock.c
 file   arch/x86/isa/rtc.c              dom0ops
diff -r 9a148882608e -r 51779f1bf671 sys/arch/xen/include/xen.h
--- a/sys/arch/xen/include/xen.h        Thu Jul 26 15:26:10 2018 +0000
+++ b/sys/arch/xen/include/xen.h        Thu Jul 26 15:38:26 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xen.h,v 1.38 2018/07/26 15:26:10 maxv Exp $    */
+/*     $NetBSD: xen.h,v 1.39 2018/07/26 15:38:26 maxv Exp $    */
 
 /*
  *
@@ -75,11 +75,8 @@
 /* xen_machdep.c */
 void   sysctl_xen_suspend_setup(void);
 
-#if defined(XENDEBUG) || 1 /* XXX */
 #include <sys/stdarg.h>
-
 void printk(const char *, ...);
-#endif
 
 #endif
 
diff -r 9a148882608e -r 51779f1bf671 sys/arch/xen/xen/xen_debug.c
--- a/sys/arch/xen/xen/xen_debug.c      Thu Jul 26 15:26:10 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*     $NetBSD: xen_debug.c,v 1.10 2018/07/26 15:26:10 maxv Exp $      */
-
-/*
- * Copyright (c) 2004 Christian Limpach.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 2002-2003, K A Fraser & R Neugebauer
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
- * DEALINGS IN THE SOFTWARE.
- */
-
-#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xen_debug.c,v 1.10 2018/07/26 15:26:10 maxv Exp $");
-
-#define XENDEBUG
-
-#include <sys/param.h>
-#include <sys/systm.h>
-
-#include <xen/xen.h>
-#include <xen/hypervisor.h>
-
-#ifdef XENDEBUG
-#define PRINTK_BUFSIZE 1024
-void
-printk(const char *fmt, ...)
-{
-       va_list ap;
-       int ret;
-       static char buf[PRINTK_BUFSIZE];
-
-       va_start(ap, fmt);
-       ret = vsnprintf(buf, PRINTK_BUFSIZE - 1, fmt, ap);
-       va_end(ap);
-       buf[ret] = 0;
-       (void)HYPERVISOR_console_io(CONSOLEIO_write, ret, buf);
-}
-#endif
diff -r 9a148882608e -r 51779f1bf671 sys/arch/xen/xen/xen_machdep.c
--- a/sys/arch/xen/xen/xen_machdep.c    Thu Jul 26 15:26:10 2018 +0000
+++ b/sys/arch/xen/xen/xen_machdep.c    Thu Jul 26 15:38:26 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xen_machdep.c,v 1.18 2018/06/30 20:53:30 kre Exp $     */
+/*     $NetBSD: xen_machdep.c,v 1.19 2018/07/26 15:38:26 maxv Exp $    */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -53,7 +53,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xen_machdep.c,v 1.18 2018/06/30 20:53:30 kre Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xen_machdep.c,v 1.19 2018/07/26 15:38:26 maxv Exp $");
 
 #include "opt_xen.h"
 
@@ -420,6 +420,21 @@
 
 }
 
+#define PRINTK_BUFSIZE 1024
+void
+printk(const char *fmt, ...)
+{
+       va_list ap;
+       int ret;
+       static char buf[PRINTK_BUFSIZE];
+
+       va_start(ap, fmt);
+       ret = vsnprintf(buf, PRINTK_BUFSIZE - 1, fmt, ap);
+       va_end(ap);
+       buf[ret] = 0;
+       (void)HYPERVISOR_console_io(CONSOLEIO_write, ret, buf);
+}
+
 bool xen_feature_tables[XENFEAT_NR_SUBMAPS * 32];
 
 void



Home | Main Index | Thread Index | Old Index