debuggers.hg
changeset 922:615324cd0f00
bitkeeper revision 1.555 (3fa7a5e43euoBbbuurbkHsps0sbRqQ)
init.c, setup.c, network.c, xl_block.c:
Small cleanups for previous checkin.
init.c, setup.c, network.c, xl_block.c:
Small cleanups for previous checkin.
author | kaf24@scramble.cl.cam.ac.uk |
---|---|
date | Tue Nov 04 13:13:08 2003 +0000 (2003-11-04) |
parents | 6cde5e25c56f |
children | 784ff7081d81 |
files | xenolinux-2.4.22-sparse/arch/xeno/drivers/block/xl_block.c xenolinux-2.4.22-sparse/arch/xeno/drivers/network/network.c xenolinux-2.4.22-sparse/arch/xeno/kernel/setup.c xenolinux-2.4.22-sparse/arch/xeno/mm/init.c |
line diff
1.1 --- a/xenolinux-2.4.22-sparse/arch/xeno/drivers/block/xl_block.c Tue Nov 04 12:48:18 2003 +0000 1.2 +++ b/xenolinux-2.4.22-sparse/arch/xeno/drivers/block/xl_block.c Tue Nov 04 13:13:08 2003 +0000 1.3 @@ -490,6 +490,23 @@ void do_xlblk_request(request_queue_t *r 1.4 } 1.5 1.6 1.7 +static void kick_pending_request_queues(void) 1.8 +{ 1.9 + /* We kick pending request queues if the ring is reasonably empty. */ 1.10 + if ( (nr_pending != 0) && 1.11 + (((req_prod - resp_cons) & (BLK_RING_SIZE - 1)) < 1.12 + (BLK_RING_SIZE >> 1)) ) 1.13 + { 1.14 + /* Attempt to drain the queue, but bail if the ring becomes full. */ 1.15 + while ( nr_pending != 0 ) 1.16 + { 1.17 + do_xlblk_request(pending_queues[--nr_pending]); 1.18 + if ( RING_PLUGGED ) break; 1.19 + } 1.20 + } 1.21 +} 1.22 + 1.23 + 1.24 static void xlblk_response_int(int irq, void *dev_id, struct pt_regs *ptregs) 1.25 { 1.26 int i; 1.27 @@ -538,18 +555,7 @@ static void xlblk_response_int(int irq, 1.28 1.29 resp_cons = i; 1.30 1.31 - /* We kick pending request queues if the ring is reasonably empty. */ 1.32 - if ( (nr_pending != 0) && 1.33 - (((req_prod - resp_cons) & (BLK_RING_SIZE - 1)) < 1.34 - (BLK_RING_SIZE >> 1)) ) 1.35 - { 1.36 - /* Attempt to drain the queue, but bail if the ring becomes full. */ 1.37 - while ( nr_pending != 0 ) 1.38 - { 1.39 - do_xlblk_request(pending_queues[--nr_pending]); 1.40 - if ( RING_PLUGGED ) break; 1.41 - } 1.42 - } 1.43 + kick_pending_request_queues(); 1.44 1.45 spin_unlock_irqrestore(&io_request_lock, flags); 1.46 } 1.47 @@ -692,4 +698,7 @@ void blkdev_suspend(void) 1.48 void blkdev_resume(void) 1.49 { 1.50 reset_xlblk_interface(); 1.51 + spin_lock_irq(&io_request_lock); 1.52 + kick_pending_request_queues(); 1.53 + spin_unlock_irq(&io_request_lock); 1.54 }
2.1 --- a/xenolinux-2.4.22-sparse/arch/xeno/drivers/network/network.c Tue Nov 04 12:48:18 2003 +0000 2.2 +++ b/xenolinux-2.4.22-sparse/arch/xeno/drivers/network/network.c Tue Nov 04 13:13:08 2003 +0000 2.3 @@ -321,7 +321,9 @@ static inline void _network_interrupt(st 2.4 2.5 if ( rx->status != RING_STATUS_OK ) 2.6 { 2.7 - printk(KERN_ALERT "bad buffer on RX ring!(%d)\n", rx->status); 2.8 + /* Gate this error. We get a (valid) slew of them on suspend. */ 2.9 + if ( np->state == STATE_ACTIVE ) 2.10 + printk(KERN_ALERT "bad buffer on RX ring!(%d)\n", rx->status); 2.11 dev_kfree_skb_any(skb); 2.12 continue; 2.13 }
3.1 --- a/xenolinux-2.4.22-sparse/arch/xeno/kernel/setup.c Tue Nov 04 12:48:18 2003 +0000 3.2 +++ b/xenolinux-2.4.22-sparse/arch/xeno/kernel/setup.c Tue Nov 04 13:13:08 2003 +0000 3.3 @@ -1080,12 +1080,14 @@ static void stop_task(void *unused) 3.4 3.5 __cli(); 3.6 3.7 + HYPERVISOR_shared_info = (shared_info_t *)empty_zero_page; 3.8 clear_fixmap(FIX_SHARED_INFO); 3.9 3.10 HYPERVISOR_stop(); 3.11 3.12 set_fixmap(FIX_SHARED_INFO, start_info.shared_info); 3.13 HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO); 3.14 + memset(empty_zero_page, 0, PAGE_SIZE); 3.15 3.16 __sti(); 3.17
4.1 --- a/xenolinux-2.4.22-sparse/arch/xeno/mm/init.c Tue Nov 04 12:48:18 2003 +0000 4.2 +++ b/xenolinux-2.4.22-sparse/arch/xeno/mm/init.c Tue Nov 04 13:13:08 2003 +0000 4.3 @@ -113,8 +113,10 @@ static inline void set_pte_phys (unsigne 4.4 } 4.5 pte = pte_offset(pmd, vaddr); 4.6 4.7 +#if 0 /* Not in Xen, since this breaks clear_fixmap. */ 4.8 if (pte_val(*pte)) 4.9 pte_ERROR(*pte); 4.10 +#endif 4.11 4.12 /* We queue directly, avoiding hidden phys->machine translation. */ 4.13 queue_l1_entry_update(pte, phys | pgprot_val(prot));