mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
bitkeeper revision 1.363 (3f171a51lxF2ZLdi2G16l31zvS1aNQ)
xen_kbd.c, schedule.c, network.c: More cleanups.
This commit is contained in:
1 parent
25620c0710
commit
06d042bf93
3 files changed
+22
-11
No files matched your search
@@ -259,8 +259,11 @@ int vif_getinfo(vif_getinfo_t *info)
|
||||
|
||||
vif = p->net_vif_list[info->vif];
|
||||
|
||||
if(vif == NULL)
|
||||
if ( vif == NULL )
|
||||
{
|
||||
put_task_struct(p);
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
info->total_bytes_sent = vif->total_bytes_sent;
|
||||
info->total_bytes_received = vif->total_bytes_received;
|
||||
|
||||
@@ -225,14 +225,15 @@ long sched_adjdom(int dom, unsigned long mcu_adv, unsigned long warp,
|
||||
dom, mcu_adv, warp, warpl, warpu);
|
||||
|
||||
p = find_domain_by_id(dom);
|
||||
if ( p == NULL ) return -ESRCH;
|
||||
if ( p == NULL )
|
||||
return -ESRCH;
|
||||
|
||||
spin_lock_irq(&schedule_data[p->processor].lock);
|
||||
|
||||
p->mcu_advance = mcu_adv;
|
||||
|
||||
spin_unlock_irq(&schedule_data[p->processor].lock);
|
||||
|
||||
put_task_struct(p);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -569,11 +570,9 @@ void __init scheduler_init(void)
|
||||
void schedulers_start(void)
|
||||
{
|
||||
printk("Start schedulers\n");
|
||||
__cli();
|
||||
sched_timer(0);
|
||||
virt_timer(0);
|
||||
smp_call_function((void *)sched_timer, NULL, 1, 1);
|
||||
__sti();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -185,12 +185,13 @@ static void keyboard_interrupt(int irq, void *dev_id, struct pt_regs *regs)
|
||||
{
|
||||
unsigned char status, scancode;
|
||||
unsigned int work = 1000;
|
||||
unsigned long cpu_mask, flags;
|
||||
unsigned long cpu_mask = 0, flags;
|
||||
struct task_struct *p = CONSOLE_OWNER;
|
||||
|
||||
spin_lock_irqsave(&kbd_lock, flags);
|
||||
|
||||
while ( (--work > 0) && ((status = kbd_read_status()) & KBD_STAT_OBF) )
|
||||
{
|
||||
{
|
||||
scancode = kbd_read_input();
|
||||
|
||||
#ifdef CONFIG_XEN_ATTENTION_KEY
|
||||
@@ -214,15 +215,23 @@ static void keyboard_interrupt(int irq, void *dev_id, struct pt_regs *regs)
|
||||
}
|
||||
#endif
|
||||
|
||||
kbd_ring_push(status, scancode);
|
||||
cpu_mask = mark_guest_event(CONSOLE_OWNER, _EVENT_KBD);
|
||||
guest_event_notify(cpu_mask);
|
||||
if ( p != NULL )
|
||||
{
|
||||
kbd_ring_push(status, scancode);
|
||||
cpu_mask |= mark_guest_event(CONSOLE_OWNER, _EVENT_KBD);
|
||||
}
|
||||
}
|
||||
|
||||
if ( !work )
|
||||
printk(KERN_ERR "xen_keyb: controller jammed (0x%02X).\n", status);
|
||||
|
||||
spin_unlock_irqrestore(&kbd_lock, flags);
|
||||
|
||||
if ( p != NULL )
|
||||
{
|
||||
put_task_struct(p);
|
||||
guest_event_notify(cpu_mask);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||