mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
Revert "keyhandler: rework process of nonirq keyhandler"
This reverts commit610b4eda2c. It's not useful withouted7e33747d, which got reverted already.
This commit is contained in:
1 parent
9f47f3d69f
commit
e267224227
4 files changed
+6
-10
No files matched your search
@@ -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);
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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];
|
||||
|
||||