WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] add hvc compatibility mode to xencons

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] add hvc compatibility mode to xencons.
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 11 Dec 2008 14:00:12 -0800
Delivery-date: Thu, 11 Dec 2008 14:00:17 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1229002728 0
# Node ID a070228ac76e3f6cd2483e0cad03f1cccae7a0c8
# Parent  5e1269aa5c2933e0cb0272bf5867e1214174bfde
add hvc compatibility mode to xencons.

Makes switching back and forth with a pvops kernel easier. Taken from
http://lists.alioth.debian.org/pipermail/pkg-xen-devel/2008-October/002098.html
http://svn.debian.org/viewsvn/kernel?rev=12337&view=rev with thanks to
Bastian Blank.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 drivers/xen/console/console.c |   24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletion(-)

diff -r 5e1269aa5c29 -r a070228ac76e drivers/xen/console/console.c
--- a/drivers/xen/console/console.c     Wed Dec 10 13:32:32 2008 +0000
+++ b/drivers/xen/console/console.c     Thu Dec 11 13:38:48 2008 +0000
@@ -66,19 +66,24 @@
  *  'xencons=tty'  [XC_TTY]:     Console attached to '/dev/tty[0-9]+'.
  *  'xencons=ttyS' [XC_SERIAL]:  Console attached to '/dev/ttyS[0-9]+'.
  *  'xencons=xvc'  [XC_XVC]:     Console attached to '/dev/xvc0'.
+ *  'xencons=hvc'  [XC_HVC]:     Console attached to '/dev/hvc0'.
  *  default:                     XC_XVC
  * 
  * NB. In mode XC_TTY, we create dummy consoles for tty2-63. This suppresses
  * warnings from standard distro startup scripts.
  */
 static enum {
-       XC_OFF, XC_TTY, XC_SERIAL, XC_XVC
+       XC_OFF, XC_TTY, XC_SERIAL, XC_XVC, XC_HVC
 } xc_mode = XC_XVC;
 static int xc_num = -1;
 
 /* /dev/xvc0 device number allocated by lanana.org. */
 #define XEN_XVC_MAJOR 204
 #define XEN_XVC_MINOR 191
+
+/* /dev/hvc0 device number */
+#define XEN_HVC_MAJOR 229
+#define XEN_HVC_MINOR 0
 
 #ifdef CONFIG_MAGIC_SYSRQ
 static unsigned long sysrq_requested;
@@ -102,6 +107,9 @@ static int __init xencons_setup(char *st
        } else if (!strncmp(str, "xvc", 3)) {
                xc_mode = XC_XVC;
                str += 3;
+       } else if (!strncmp(str, "hvc", 3)) {
+               xc_mode = XC_HVC;
+               str += 3;
        } else if (!strncmp(str, "off", 3)) {
                xc_mode = XC_OFF;
                str += 3;
@@ -208,6 +216,14 @@ static int __init xen_console_init(void)
                strcpy(kcons_info.name, "xvc");
                if (xc_num == -1)
                        xc_num = 0;
+               break;
+
+       case XC_HVC:
+               strcpy(kcons_info.name, "hvc");
+               if (xc_num == -1)
+                       xc_num = 0;
+               if (!is_initial_xendomain())
+                       add_preferred_console(kcons_info.name, xc_num, NULL);
                break;
 
        case XC_SERIAL:
@@ -685,6 +701,12 @@ static int __init xencons_init(void)
                DRV(xencons_driver)->minor_start = XEN_XVC_MINOR;
                DRV(xencons_driver)->name_base   = xc_num;
                break;
+       case XC_HVC:
+               DRV(xencons_driver)->name        = "hvc";
+               DRV(xencons_driver)->major       = XEN_HVC_MAJOR;
+               DRV(xencons_driver)->minor_start = XEN_HVC_MINOR;
+               DRV(xencons_driver)->name_base   = xc_num;
+               break;
        case XC_SERIAL:
                DRV(xencons_driver)->name        = "ttyS";
                DRV(xencons_driver)->minor_start = 64 + xc_num;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] add hvc compatibility mode to xencons., Xen patchbot-linux-2.6.18-xen <=