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

[Xen-changelog] [xen master] Revert "keyhandler: rework process of nonirq keyhandler"



commit e26722422764d3ddfe59e76f5efbd330f8f9288f
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Wed Oct 26 16:13:21 2016 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Oct 26 16:13:21 2016 +0200

    Revert "keyhandler: rework process of nonirq keyhandler"
    
    This reverts commit 610b4eda2ce2b87cccbc8f61bdec01052e54fc66.
    It's not useful without ed7e33747d, which got reverted already.
---
 xen/common/keyhandler.c      | 9 +++------
 xen/common/sysctl.c          | 2 +-
 xen/drivers/char/console.c   | 2 +-
 xen/include/xen/keyhandler.h | 3 +--
 4 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/xen/common/keyhandler.c b/xen/common/keyhandler.c
index 2f7c364..16de6e8 100644
--- a/xen/common/keyhandler.c
+++ b/xen/common/keyhandler.c
@@ -75,22 +75,19 @@ static struct keyhandler {
 
 static void keypress_action(unsigned long unused)
 {
-    console_start_log_everything();
-    key_table[keypress_key].fn(keypress_key);
-    console_end_log_everything();
+    handle_keypress(keypress_key, NULL);
 }
 
 static DECLARE_TASKLET(keypress_tasklet, keypress_action, 0);
 
-void handle_keypress(unsigned char key, struct cpu_user_regs *regs,
-                     bool force_tasklet)
+void handle_keypress(unsigned char key, struct cpu_user_regs *regs)
 {
     struct keyhandler *h;
 
     if ( key >= ARRAY_SIZE(key_table) || !(h = &key_table[key])->fn )
         return;
 
-    if ( h->irq_callback || !force_tasklet )
+    if ( !in_irq() || h->irq_callback )
     {
         console_start_log_everything();
         h->irq_callback ? h->irq_fn(key, regs) : h->fn(key);
diff --git a/xen/common/sysctl.c b/xen/common/sysctl.c
index 1eb7bad..8aea6ef 100644
--- a/xen/common/sysctl.c
+++ b/xen/common/sysctl.c
@@ -136,7 +136,7 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) 
u_sysctl)
         {
             if ( copy_from_guest_offset(&c, op->u.debug_keys.keys, i, 1) )
                 goto out;
-            handle_keypress(c, guest_cpu_user_regs(), false);
+            handle_keypress(c, guest_cpu_user_regs());
         }
         ret = 0;
         copyback = 0;
diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index b0f74ce..55ae31a 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -347,7 +347,7 @@ static void switch_serial_input(void)
 static void __serial_rx(char c, struct cpu_user_regs *regs)
 {
     if ( xen_rx )
-        return handle_keypress(c, regs, !in_irq());
+        return handle_keypress(c, regs);
 
     /* Deliver input to guest buffer, unless it is already full. */
     if ( (serial_rx_prod-serial_rx_cons) != SERIAL_RX_SIZE )
diff --git a/xen/include/xen/keyhandler.h b/xen/include/xen/keyhandler.h
index fe32d8a..06c05c8 100644
--- a/xen/include/xen/keyhandler.h
+++ b/xen/include/xen/keyhandler.h
@@ -46,8 +46,7 @@ void register_irq_keyhandler(unsigned char key,
                              bool_t diagnostic);
 
 /* Inject a keypress into the key-handling subsystem. */
-extern void handle_keypress(unsigned char key, struct cpu_user_regs *regs,
-                            bool force_tasklet);
+extern void handle_keypress(unsigned char key, struct cpu_user_regs *regs);
 
 /* Scratch space is available for use of any keyhandler. */
 extern char keyhandler_scratch[1024];
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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