Changeset cecb0789 in mainline for kernel/genarch/src/kbd/i8042.c


Ignore:
Timestamp:
2009-02-21T17:27:59Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9688513
Parents:
0cb9fa0
Message:

This is the evil commit. In particular, it does:

  • introduces more powerful pseudo code for userspace IRQ top-half handlers
  • changes the internals of IRQ dispatching
  • simplifies the kernel's i8042 driver
  • adapts the uspace i8042 driver to make use of the new pseudocode
  • breaks all other architectures except ia32
  • breaks almost all existing drivers
  • breaks switching between uspace and kernel drivers
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/src/kbd/i8042.c

    r0cb9fa0 rcecb0789  
    9595static irq_t i8042_mouse_irq;
    9696
    97 void i8042_grab(void)
    98 {
    99         ipl_t ipl = interrupts_disable();
    100        
    101         spinlock_lock(&i8042_kbd_irq.lock);
    102         i8042_kbd_irq.notif_cfg.notify = false;
    103         spinlock_unlock(&i8042_kbd_irq.lock);
    104        
    105         spinlock_lock(&i8042_mouse_irq.lock);
    106         i8042_mouse_irq.notif_cfg.notify = false;
    107         spinlock_unlock(&i8042_mouse_irq.lock);
    108        
    109         interrupts_restore(ipl);
    110 }
    111 
    112 void i8042_release(void)
    113 {
    114         ipl_t ipl = interrupts_disable();
    115        
    116         spinlock_lock(&i8042_kbd_irq.lock);
    117         if (i8042_kbd_irq.notif_cfg.answerbox)
    118                 i8042_kbd_irq.notif_cfg.notify = true;
    119         spinlock_unlock(&i8042_kbd_irq.lock);
    120        
    121         spinlock_lock(&i8042_mouse_irq.lock);
    122         if (i8042_mouse_irq.notif_cfg.answerbox)
    123                 i8042_mouse_irq.notif_cfg.notify = true;
    124         spinlock_unlock(&i8042_mouse_irq.lock);
    125        
    126         interrupts_restore(ipl);
    127 }
    128 
    12997static irq_ownership_t i8042_claim(irq_t *irq)
    13098{
     
    139107static void i8042_irq_handler(irq_t *irq)
    140108{
    141         if (irq->notif_cfg.notify && irq->notif_cfg.answerbox) {
    142                 /*
    143                  * This will hopefully go to the IRQ dispatcher code soon.
    144                  */
    145                 ipc_irq_send_notif(irq);
    146                 return;
    147         }
    148 
    149109        i8042_instance_t *instance = irq->instance;
    150110        i8042_t *dev = instance->i8042;
     
    214174        sysinfo_set_item_val("mouse.devno", NULL, mouse_devno);
    215175        sysinfo_set_item_val("mouse.inr", NULL, mouse_inr);
    216        
    217         i8042_grab();
    218176}
    219177
Note: See TracChangeset for help on using the changeset viewer.