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

[PATCH v1 6/8] xen/console: rename console_rx to console_focus



Update the symbol name in preparation for the semantic change
to the physical console input owner domain identifier.

No functional change.

Signed-off-by: Denis Mukhin <dmukhin@xxxxxxxx>
---
 xen/drivers/char/console.c | 23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)

diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index 5910ff701c..3d538510f4 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -465,12 +465,9 @@ static void cf_check dump_console_ring_key(unsigned char 
key)
  * and the DomUs started from Xen at boot.
  */
 #define switch_code (opt_conswitch[0]-'a'+1)
-/*
- * console_rx=0 => input to xen
- * console_rx=1 => input to dom0 (or the sole shim domain)
- * console_rx=N => input to dom(N-1)
- */
-static unsigned int __read_mostly console_rx = 0;
+
+/* Console owner domain identifier. */
+static unsigned int __read_mostly console_focus = 0;
 
 #define max_console_rx (domid_top + 1)
 
@@ -491,9 +488,9 @@ static struct domain *console_get_domain_by_id(domid_t 
domid)
 
 struct domain *console_get_domain(void)
 {
-    if ( console_rx == 0 )
+    if ( console_focus == 0 )
             return NULL;
-    return console_get_domain_by_id(console_rx - 1);
+    return console_get_domain_by_id(console_focus - 1);
 }
 
 void console_put_domain(struct domain *d)
@@ -513,7 +510,7 @@ static bool console_check_focus_by_id(domid_t domid)
 
 static void console_switch_focus(void)
 {
-    unsigned int next_rx = console_rx;
+    unsigned int next_rx = console_focus;
 
     /*
      * Rotate among Xen, dom0 and boot-time created domUs while skipping
@@ -525,7 +522,7 @@ static void console_switch_focus(void)
 
         if ( next_rx++ >= max_console_rx )
         {
-            console_rx = 0;
+            console_focus = 0;
             printk("*** Serial input to Xen");
             break;
         }
@@ -537,7 +534,7 @@ static void console_switch_focus(void)
 
         if ( console_check_focus_by_id(domid) )
         {
-            console_rx = next_rx;
+            console_focus = next_rx;
             printk("*** Serial input to DOM%u", domid);
             break;
         }
@@ -554,7 +551,7 @@ static void __serial_rx(char c)
     struct domain *d;
     int rc = 0;
 
-    if ( console_rx == 0 )
+    if ( console_focus == 0 )
         return handle_keypress(c, false);
 
     d = console_get_domain();
@@ -1150,7 +1147,7 @@ void __init console_endboot(void)
      * a useful 'how to switch' message.
      */
     if ( opt_conswitch[1] == 'x' )
-        console_rx = max_console_rx;
+        console_focus = max_console_rx;
 
     register_keyhandler('w', dump_console_ring_key,
                         "synchronously dump console ring buffer (dmesg)", 0);
-- 
2.34.1





 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.