debuggers.hg
changeset 984:7a554cbf0f58
bitkeeper revision 1.602 (3fb3b425Vofdr5SY3t-phN5DXjLizw)
Merge scramble.cl.cam.ac.uk:/auto/groups/xeno/BK/xeno.bk
into scramble.cl.cam.ac.uk:/local/scratch/kaf24/xeno
Merge scramble.cl.cam.ac.uk:/auto/groups/xeno/BK/xeno.bk
into scramble.cl.cam.ac.uk:/local/scratch/kaf24/xeno
author | kaf24@scramble.cl.cam.ac.uk |
---|---|
date | Thu Nov 13 16:41:09 2003 +0000 (2003-11-13) |
parents | d27779dd034c db2e1ea917df |
children | c7dc2e589f8f |
files | xen/arch/i386/apic.c xen/arch/i386/irq.c xen/arch/i386/smp.c xen/arch/i386/time.c xen/common/ac_timer.c xen/common/softirq.c xen/drivers/scsi/aacraid/aacraid.h xen/drivers/scsi/aacraid/commsup.c xen/drivers/scsi/aacraid/rx.c xen/drivers/scsi/aic7xxx/aic7xxx_osm.c xen/drivers/scsi/scsi.c xen/include/asm-i386/softirq.h xen/include/xeno/ac_timer.h xen/include/xeno/netdevice.h |
line diff
1.1 --- a/xen/arch/i386/apic.c Thu Nov 13 16:34:35 2003 +0000 1.2 +++ b/xen/arch/i386/apic.c Thu Nov 13 16:41:09 2003 +0000 1.3 @@ -711,58 +711,18 @@ int reprogram_ac_timer(s_time_t timeout) 1.4 return 1; 1.5 } 1.6 1.7 -/* 1.8 - * Local timer interrupt handler. 1.9 - * Here the programmable, accurate timers are executed. 1.10 - */ 1.11 -inline void smp_local_timer_interrupt(struct pt_regs *regs) 1.12 -{ 1.13 - do_ac_timer(); 1.14 -} 1.15 - 1.16 -/* 1.17 - * Local APIC timer interrupt. This is the most natural way for doing 1.18 - * local interrupts, but local timer interrupts can be emulated by 1.19 - * broadcast interrupts too. [in case the hw doesnt support APIC timers] 1.20 - * 1.21 - * [ if a single-CPU system runs an SMP kernel then we call the local 1.22 - * interrupt as well. Thus we cannot inline the local irq ... ] 1.23 - */ 1.24 unsigned int apic_timer_irqs [NR_CPUS]; 1.25 1.26 void smp_apic_timer_interrupt(struct pt_regs * regs) 1.27 { 1.28 int cpu = smp_processor_id(); 1.29 -#ifndef NDEBUG 1.30 - u32 cc_start, cc_end; 1.31 - rdtscl(cc_start); 1.32 -#endif 1.33 1.34 - /* 1.35 - * the NMI deadlock-detector uses this. 1.36 - */ 1.37 - apic_timer_irqs[cpu]++; 1.38 - 1.39 - /* 1.40 - * NOTE! We'd better ACK the irq immediately, because timer handling can 1.41 - * be slow. XXX is this save? 1.42 - */ 1.43 ack_APIC_irq(); 1.44 1.45 - /* call the local handler */ 1.46 - irq_enter(cpu, 0); 1.47 + apic_timer_irqs[cpu]++; 1.48 perfc_incrc(apic_timer); 1.49 - smp_local_timer_interrupt(regs); 1.50 - irq_exit(cpu, 0); 1.51 1.52 - if (softirq_pending(cpu)) 1.53 - do_softirq(); 1.54 - 1.55 -#ifndef NDEBUG 1.56 - rdtscl(cc_end); 1.57 - if ( (cc_end - cc_start) > (cpu_khz * 100) ) 1.58 - printk("APIC Long ISR on CPU=%02d %08X -> %08X\n",cpu,cc_start,cc_end); 1.59 -#endif 1.60 + __cpu_raise_softirq(cpu, AC_TIMER_SOFTIRQ); 1.61 } 1.62 1.63 /*
2.1 --- a/xen/arch/i386/irq.c Thu Nov 13 16:34:35 2003 +0000 2.2 +++ b/xen/arch/i386/irq.c Thu Nov 13 16:41:09 2003 +0000 2.3 @@ -535,9 +535,6 @@ asmlinkage unsigned int do_IRQ(struct pt 2.4 desc->handler->end(irq); 2.5 spin_unlock(&desc->lock); 2.6 2.7 - if (softirq_pending(cpu)) 2.8 - do_softirq(); 2.9 - 2.10 rdtscl(cc_end); 2.11 2.12 if ( !action || (!(action->flags & SA_NOPROFILE)) )
3.1 --- a/xen/arch/i386/smp.c Thu Nov 13 16:34:35 2003 +0000 3.2 +++ b/xen/arch/i386/smp.c Thu Nov 13 16:41:09 2003 +0000 3.3 @@ -261,17 +261,11 @@ static volatile unsigned long flush_cpum 3.4 static spinlock_t tlbstate_lock = SPIN_LOCK_UNLOCKED; 3.5 #define FLUSH_ALL 0xffffffff 3.6 3.7 -asmlinkage void smp_invalidate_interrupt (void) 3.8 +asmlinkage void smp_invalidate_interrupt(void) 3.9 { 3.10 - unsigned long cpu = smp_processor_id(); 3.11 - 3.12 - if (!test_bit(cpu, &flush_cpumask)) 3.13 - return; 3.14 - 3.15 - local_flush_tlb(); 3.16 - 3.17 ack_APIC_irq(); 3.18 - clear_bit(cpu, &flush_cpumask); 3.19 + if (test_and_clear_bit(smp_processor_id(), &flush_cpumask)) 3.20 + local_flush_tlb(); 3.21 } 3.22 3.23 void flush_tlb_others(unsigned long cpumask)
4.1 --- a/xen/arch/i386/time.c Thu Nov 13 16:34:35 2003 +0000 4.2 +++ b/xen/arch/i386/time.c Thu Nov 13 16:41:09 2003 +0000 4.3 @@ -96,7 +96,7 @@ static void timer_interrupt(int irq, voi 4.4 4.5 /* Rough hack to allow accurate timers to sort-of-work with no APIC. */ 4.6 if ( do_timer_lists_from_pit ) 4.7 - do_ac_timer(); 4.8 + __cpu_raise_softirq(smp_processor_id(), AC_TIMER_SOFTIRQ); 4.9 } 4.10 4.11 static struct irqaction irq0 = { timer_interrupt, SA_INTERRUPT, 0,
5.1 --- a/xen/common/ac_timer.c Thu Nov 13 16:34:35 2003 +0000 5.2 +++ b/xen/common/ac_timer.c Thu Nov 13 16:41:09 2003 +0000 5.3 @@ -241,88 +241,35 @@ void mod_ac_timer(struct ac_timer *timer 5.4 } 5.5 5.6 5.7 -void do_ac_timer(void) 5.8 +static void ac_timer_softirq_action(struct softirq_action *a) 5.9 { 5.10 int cpu = smp_processor_id(); 5.11 - unsigned long flags; 5.12 struct ac_timer *t, **heap; 5.13 - s_time_t diff, now = NOW(); 5.14 - long max; 5.15 - 5.16 - spin_lock_irqsave(&ac_timers[cpu].lock, flags); 5.17 - 5.18 - do_timer_again: 5.19 - TRC(printk("ACT [%02d] do(): now=%lld\n", cpu, NOW())); 5.20 - 5.21 - heap = ac_timers[cpu].heap; 5.22 - 5.23 - while ( (GET_HEAP_SIZE(heap) != 0) && 5.24 - ((t = heap[1])->expires < (NOW() + TIMER_SLOP)) ) 5.25 - { 5.26 - remove_entry(heap, t); 5.27 - 5.28 - /* Do some stats collection. */ 5.29 - diff = (now - t->expires); 5.30 - if ( diff > 0x7fffffff ) 5.31 - diff = 0x7fffffff; /* THIS IS BAD! */ 5.32 - max = perfc_valuea(ac_timer_max, cpu); 5.33 - if ( diff > max ) 5.34 - perfc_seta(ac_timer_max, cpu, diff); 5.35 - 5.36 - spin_unlock_irqrestore(&ac_timers[cpu].lock, flags); 5.37 - if ( t->function != NULL ) 5.38 - t->function(t->data); 5.39 - spin_lock_irqsave(&ac_timers[cpu].lock, flags); 5.40 - 5.41 - /* Heap may have grown while the lock was released. */ 5.42 - heap = ac_timers[cpu].heap; 5.43 - } 5.44 + s_time_t now; 5.45 5.46 - if ( GET_HEAP_SIZE(heap) != 0 ) 5.47 - { 5.48 - if ( !reprogram_ac_timer(heap[1]->expires) ) 5.49 - goto do_timer_again; 5.50 - } 5.51 - else 5.52 - { 5.53 - reprogram_ac_timer(0); 5.54 + spin_lock_irq(&ac_timers[cpu].lock); 5.55 + 5.56 + do { 5.57 + heap = ac_timers[cpu].heap; 5.58 + now = NOW(); 5.59 + 5.60 + while ( (GET_HEAP_SIZE(heap) != 0) && 5.61 + ((t = heap[1])->expires < (now + TIMER_SLOP)) ) 5.62 + { 5.63 + remove_entry(heap, t); 5.64 + 5.65 + spin_unlock_irq(&ac_timers[cpu].lock); 5.66 + if ( t->function != NULL ) 5.67 + t->function(t->data); 5.68 + spin_lock_irq(&ac_timers[cpu].lock); 5.69 + 5.70 + /* Heap may have grown while the lock was released. */ 5.71 + heap = ac_timers[cpu].heap; 5.72 + } 5.73 } 5.74 - 5.75 - spin_unlock_irqrestore(&ac_timers[cpu].lock, flags); 5.76 - TRC(printk("ACT [%02d] do(): end\n", cpu)); 5.77 -} 5.78 - 5.79 - 5.80 -static void ac_timer_softirq_action(struct softirq_action *a) 5.81 -{ 5.82 - int cpu = smp_processor_id(); 5.83 - unsigned long flags; 5.84 - struct ac_timer *t; 5.85 - int process_timer_list = 0; 5.86 + while ( !reprogram_ac_timer(GET_HEAP_SIZE(heap) ? heap[1]->expires : 0) ); 5.87 5.88 - spin_lock_irqsave(&ac_timers[cpu].lock, flags); 5.89 - 5.90 - if ( GET_HEAP_SIZE(ac_timers[cpu].heap) != 0 ) 5.91 - { 5.92 - /* 5.93 - * Reprogram timer with earliest deadline. If that has already passed 5.94 - * then we will process the timer list as soon as we release the lock. 5.95 - */ 5.96 - t = ac_timers[cpu].heap[1]; 5.97 - if ( (t->expires < (NOW() + TIMER_SLOP)) || 5.98 - !reprogram_ac_timer(t->expires) ) 5.99 - process_timer_list = 1; 5.100 - } 5.101 - else 5.102 - { 5.103 - /* No deadline to program the timer with.*/ 5.104 - reprogram_ac_timer((s_time_t)0); 5.105 - } 5.106 - 5.107 - spin_unlock_irqrestore(&ac_timers[cpu].lock, flags); 5.108 - 5.109 - if ( process_timer_list ) 5.110 - do_ac_timer(); 5.111 + spin_unlock_irq(&ac_timers[cpu].lock); 5.112 } 5.113 5.114
6.1 --- a/xen/common/softirq.c Thu Nov 13 16:34:35 2003 +0000 6.2 +++ b/xen/common/softirq.c Thu Nov 13 16:41:09 2003 +0000 6.3 @@ -12,9 +12,7 @@ 6.4 #include <linux/config.h> 6.5 #include <linux/mm.h> 6.6 #include <linux/sched.h> 6.7 -//#include <linux/kernel_stat.h> 6.8 #include <linux/interrupt.h> 6.9 -//#include <linux/smp_lock.h> 6.10 #include <linux/init.h> 6.11 #include <linux/tqueue.h> 6.12 6.13 @@ -51,48 +49,30 @@ asmlinkage void do_softirq() 6.14 int cpu = smp_processor_id(); 6.15 struct softirq_action *h; 6.16 __u32 pending; 6.17 - long flags; 6.18 6.19 - if (in_interrupt()) 6.20 - return; 6.21 - 6.22 - local_irq_save(flags); 6.23 - 6.24 - pending = xchg(&softirq_pending(cpu), 0); 6.25 - if ( !pending ) goto out; 6.26 + if ( in_interrupt() ) 6.27 + BUG(); 6.28 6.29 local_bh_disable(); 6.30 6.31 - do { 6.32 - local_irq_enable(); 6.33 - 6.34 + while ( (pending = xchg(&softirq_pending(cpu), 0)) != 0 ) 6.35 + { 6.36 h = softirq_vec; 6.37 - 6.38 - do { 6.39 + while ( pending ) 6.40 + { 6.41 if (pending & 1) 6.42 h->action(h); 6.43 h++; 6.44 pending >>= 1; 6.45 - } while (pending); 6.46 - 6.47 - local_irq_disable(); 6.48 - 6.49 - pending = xchg(&softirq_pending(cpu), 0); 6.50 - } while ( pending ); 6.51 + } 6.52 + } 6.53 6.54 __local_bh_enable(); 6.55 - 6.56 -out: 6.57 - local_irq_restore(flags); 6.58 } 6.59 6.60 -/* 6.61 - * This function must run with irq disabled! 6.62 - */ 6.63 inline void cpu_raise_softirq(unsigned int cpu, unsigned int nr) 6.64 { 6.65 __cpu_raise_softirq(cpu, nr); 6.66 - 6.67 #ifdef CONFIG_SMP 6.68 if ( cpu != smp_processor_id() ) 6.69 smp_send_event_check_cpu(cpu); 6.70 @@ -101,11 +81,7 @@ inline void cpu_raise_softirq(unsigned i 6.71 6.72 void raise_softirq(unsigned int nr) 6.73 { 6.74 - long flags; 6.75 - 6.76 - local_irq_save(flags); 6.77 cpu_raise_softirq(smp_processor_id(), nr); 6.78 - local_irq_restore(flags); 6.79 } 6.80 6.81 void open_softirq(int nr, void (*action)(struct softirq_action*), void *data) 6.82 @@ -224,7 +200,7 @@ void tasklet_init(struct tasklet_struct 6.83 void tasklet_kill(struct tasklet_struct *t) 6.84 { 6.85 if (in_interrupt()) 6.86 - printk("Attempt to kill tasklet from interrupt\n"); 6.87 + BUG(); 6.88 while (test_and_set_bit(TASKLET_STATE_SCHED, &t->state)) 6.89 while (test_bit(TASKLET_STATE_SCHED, &t->state)) 6.90 do_softirq();
7.1 --- a/xen/drivers/scsi/aacraid/aacraid.h Thu Nov 13 16:34:35 2003 +0000 7.2 +++ b/xen/drivers/scsi/aacraid/aacraid.h Thu Nov 13 16:41:09 2003 +0000 7.3 @@ -3,11 +3,8 @@ 7.4 # define dprintk(x) 7.5 #endif 7.6 7.7 -/* Start of Xen additions XXX */ 7.8 #include <asm/byteorder.h> 7.9 #include <xeno/interrupt.h> 7.10 -#define TRY_TASKLET 7.11 -/* End of Xen additions XXX */ 7.12 7.13 /*------------------------------------------------------------------------------ 7.14 * D E F I N E S 7.15 @@ -1416,12 +1413,7 @@ int aac_rx_init(struct aac_dev *dev, uns 7.16 int aac_sa_init(struct aac_dev *dev, unsigned long devNumber); 7.17 unsigned int aac_response_normal(struct aac_queue * q); 7.18 unsigned int aac_command_normal(struct aac_queue * q); 7.19 -#ifdef TRY_TASKLET 7.20 -extern struct tasklet_struct aac_command_tasklet; 7.21 -void aac_command_thread(unsigned long data); 7.22 -#else 7.23 -int aac_command_thread(struct aac_dev * dev); 7.24 -#endif 7.25 +void aac_command_thread(struct aac_dev * dev); 7.26 int aac_close_fib_context(struct aac_dev * dev, struct aac_fib_context *fibctx); 7.27 int fib_adapter_complete(struct fib * fibptr, unsigned short size); 7.28 struct aac_driver_ident* aac_get_driver_ident(int devtype);
8.1 --- a/xen/drivers/scsi/aacraid/commsup.c Thu Nov 13 16:34:35 2003 +0000 8.2 +++ b/xen/drivers/scsi/aacraid/commsup.c Thu Nov 13 16:41:09 2003 +0000 8.3 @@ -523,24 +523,8 @@ int fib_send(u16 command, struct fib * f 8.4 8.5 if (wait) { 8.6 spin_unlock_irqrestore(&fibptr->event_lock, flags); 8.7 -#if 0 8.8 - down(&fibptr->event_wait); 8.9 - if(fibptr->done == 0) 8.10 - BUG(); 8.11 -#endif 8.12 -#ifdef TRY_TASKLET 8.13 - while (!fibptr->done) { 8.14 - tasklet_schedule(&aac_command_tasklet); 8.15 - do_softirq(); /* force execution */ 8.16 - } 8.17 -#else 8.18 - while (!fibptr->done) { 8.19 - mdelay(100); 8.20 - aac_command_thread(dev); 8.21 - } 8.22 -#endif 8.23 - 8.24 - 8.25 + while (!fibptr->done) 8.26 + aac_command_thread(dev); 8.27 if((fibptr->flags & FIB_CONTEXT_FLAG_TIMED_OUT)) 8.28 return -ETIMEDOUT; 8.29 else 8.30 @@ -924,62 +908,27 @@ static void aac_handle_aif(struct aac_de 8.31 * until the queue is empty. When the queue is empty it will wait for 8.32 * more FIBs. 8.33 */ 8.34 -#ifndef TRY_TASKLET 8.35 -int aac_command_thread(struct aac_dev * dev) 8.36 +void aac_command_thread(struct aac_dev * dev) 8.37 { 8.38 -#else 8.39 -DECLARE_TASKLET_DISABLED(aac_command_tasklet, aac_command_thread, 0); 8.40 -void aac_command_thread(unsigned long data) 8.41 -#define return(_x) return 8.42 -{ 8.43 - struct aac_dev *dev = (struct aac_dev *)data; 8.44 -#endif 8.45 struct hw_fib *hw_fib, *hw_newfib; 8.46 struct fib *fib, *newfib; 8.47 struct aac_queue_block *queues = dev->queues; 8.48 struct aac_fib_context *fibctx; 8.49 unsigned long flags; 8.50 -#if 0 8.51 - DECLARE_WAITQUEUE(wait, current); 8.52 -#endif 8.53 + static spinlock_t lock = SPIN_LOCK_UNLOCKED; 8.54 8.55 - /* 8.56 - * We can only have one thread per adapter for AIF's. 8.57 - */ 8.58 - if (dev->aif_thread) 8.59 - return(-EINVAL); 8.60 -#if 0 8.61 - /* 8.62 - * Set up the name that will appear in 'ps' 8.63 - * stored in task_struct.comm[16]. 8.64 - */ 8.65 - sprintf(current->comm, "aacraid"); 8.66 - daemonize(); 8.67 -#endif 8.68 - /* 8.69 - * Let the DPC know it has a place to send the AIF's to. 8.70 - */ 8.71 - dev->aif_thread = 1; 8.72 -#if 0 8.73 - add_wait_queue(&queues->queue[HostNormCmdQueue].cmdready, &wait); 8.74 - set_current_state(TASK_INTERRUPTIBLE); 8.75 - dprintk ((KERN_INFO "aac_command_thread start\n")); 8.76 - while(1) 8.77 -#endif 8.78 + spin_lock_irqsave(&lock, flags); 8.79 + 8.80 { 8.81 - spin_lock_irqsave(queues->queue[HostNormCmdQueue].lock, flags); 8.82 + spin_lock(queues->queue[HostNormCmdQueue].lock); 8.83 while(!list_empty(&(queues->queue[HostNormCmdQueue].cmdq))) { 8.84 struct list_head *entry; 8.85 struct aac_aifcmd * aifcmd; 8.86 8.87 -#if 0 8.88 - set_current_state(TASK_RUNNING); 8.89 -#endif 8.90 - 8.91 entry = queues->queue[HostNormCmdQueue].cmdq.next; 8.92 list_del(entry); 8.93 8.94 - spin_unlock_irqrestore(queues->queue[HostNormCmdQueue].lock, flags); 8.95 + spin_unlock(queues->queue[HostNormCmdQueue].lock); 8.96 fib = list_entry(entry, struct fib, fiblink); 8.97 /* 8.98 * We will process the FIB here or pass it to a 8.99 @@ -1074,13 +1023,6 @@ void aac_command_thread(unsigned long da 8.100 */ 8.101 list_add_tail(&newfib->fiblink, &fibctx->fib_list); 8.102 fibctx->count++; 8.103 -#if 0 8.104 - /* 8.105 - * Set the event to wake up the 8.106 - * thread that will waiting. 8.107 - */ 8.108 - up(&fibctx->wait_sem); 8.109 -#endif 8.110 } else { 8.111 printk(KERN_WARNING "aifd: didn't allocate NewFib.\n"); 8.112 if(newfib) 8.113 @@ -1097,27 +1039,14 @@ void aac_command_thread(unsigned long da 8.114 fib_adapter_complete(fib, sizeof(u32)); 8.115 spin_unlock_irqrestore(&dev->fib_lock, flagv); 8.116 } 8.117 - spin_lock_irqsave(queues->queue[HostNormCmdQueue].lock, flags); 8.118 + spin_lock(queues->queue[HostNormCmdQueue].lock); 8.119 kfree(fib); 8.120 } 8.121 /* 8.122 * There are no more AIF's 8.123 */ 8.124 - spin_unlock_irqrestore(queues->queue[HostNormCmdQueue].lock, flags); 8.125 -#if 0 8.126 - schedule(); 8.127 - 8.128 - if(signal_pending(current)) 8.129 - break; 8.130 - set_current_state(TASK_INTERRUPTIBLE); 8.131 -#endif 8.132 + spin_unlock(queues->queue[HostNormCmdQueue].lock); 8.133 } 8.134 -#if 0 8.135 - remove_wait_queue(&queues->queue[HostNormCmdQueue].cmdready, &wait); 8.136 - dev->aif_thread = 0; 8.137 - complete_and_exit(&dev->aif_completion, 0); 8.138 -#else 8.139 - mdelay(50); 8.140 - dev->aif_thread = 0; 8.141 -#endif 8.142 + 8.143 + spin_unlock_irqrestore(&lock, flags); 8.144 }
9.1 --- a/xen/drivers/scsi/aacraid/rx.c Thu Nov 13 16:34:35 2003 +0000 9.2 +++ b/xen/drivers/scsi/aacraid/rx.c Thu Nov 13 16:41:09 2003 +0000 9.3 @@ -406,20 +406,6 @@ int aac_rx_init(struct aac_dev *dev, uns 9.4 9.5 if (aac_init_adapter(dev) == NULL) 9.6 return -1; 9.7 -#ifdef TRY_TASKLET 9.8 - aac_command_tasklet.data = (unsigned long)dev; 9.9 - tasklet_enable(&aac_command_tasklet); 9.10 -#else 9.11 - /* 9.12 - * Start any kernel threads needed 9.13 - */ 9.14 - dev->thread_pid = kernel_thread((int (*)(void *))aac_command_thread, dev, 0); 9.15 - if(dev->thread_pid < 0) 9.16 - { 9.17 - printk(KERN_ERR "aacraid: Unable to create rx thread.\n"); 9.18 - return -1; 9.19 - } 9.20 -#endif 9.21 /* 9.22 * Tell the adapter that all is configured, and it can start 9.23 * accepting requests
10.1 --- a/xen/drivers/scsi/aic7xxx/aic7xxx_osm.c Thu Nov 13 16:34:35 2003 +0000 10.2 +++ b/xen/drivers/scsi/aic7xxx/aic7xxx_osm.c Thu Nov 13 16:41:09 2003 +0000 10.3 @@ -1903,7 +1903,6 @@ ahc_linux_isr(int irq, void *dev_id, str 10.4 if (next_dev) { 10.5 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) 10.6 tasklet_schedule(&ahc->platform_data->runq_tasklet); 10.7 - do_softirq(); 10.8 #else 10.9 ahc_runq_tasklet((unsigned long)ahc); 10.10 #endif 10.11 @@ -2535,7 +2534,6 @@ ahc_linux_release_sim_queue(u_long arg) 10.12 scsi_unblock_requests(ahc->platform_data->host); 10.13 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) 10.14 tasklet_schedule(&ahc->platform_data->runq_tasklet); 10.15 - do_softirq(); 10.16 #else 10.17 ahc_runq_tasklet((unsigned long)ahc); 10.18 #endif
11.1 --- a/xen/drivers/scsi/scsi.c Thu Nov 13 16:34:35 2003 +0000 11.2 +++ b/xen/drivers/scsi/scsi.c Thu Nov 13 16:41:09 2003 +0000 11.3 @@ -840,6 +840,7 @@ void scsi_wait_req (Scsi_Request * SRpnt 11.4 if it hasn't been done already. This is not the correct behaviour 11.5 in xen ... hmm .. how to fix? */ 11.6 while(wait) { 11.7 + do_softirq(); /* XXX KAF: this is safe, and necessary!! */ 11.8 udelay(500); 11.9 usecs += 500; 11.10 if(usecs > 1000000) {
12.1 --- a/xen/include/asm-i386/softirq.h Thu Nov 13 16:34:35 2003 +0000 12.2 +++ b/xen/include/asm-i386/softirq.h Thu Nov 13 16:41:09 2003 +0000 12.3 @@ -9,40 +9,10 @@ 12.4 #define cpu_bh_disable(cpu) \ 12.5 do { local_bh_count(cpu)++; barrier(); } while (0) 12.6 12.7 -#define local_bh_disable() cpu_bh_disable(smp_processor_id()) 12.8 -#define __local_bh_enable() __cpu_bh_enable(smp_processor_id()) 12.9 +#define local_bh_disable() cpu_bh_disable(smp_processor_id()) 12.10 +#define __local_bh_enable() __cpu_bh_enable(smp_processor_id()) 12.11 +#define local_bh_enable() __local_bh_enable() 12.12 12.13 #define in_softirq() (local_bh_count(smp_processor_id()) != 0) 12.14 12.15 -/* 12.16 - * NOTE: this assembly code assumes: 12.17 - * 12.18 - * (char *)&local_bh_count - 8 == (char *)&softirq_pending 12.19 - * 12.20 - * If you change the offsets in irq_stat then you have to 12.21 - * update this code as well. 12.22 - */ 12.23 -#define local_bh_enable() \ 12.24 -do { \ 12.25 - unsigned int *ptr = &local_bh_count(smp_processor_id()); \ 12.26 - \ 12.27 - barrier(); \ 12.28 - if (!--*ptr) \ 12.29 - __asm__ __volatile__ ( \ 12.30 - "cmpl $0, -8(%0);" \ 12.31 - "jnz 2f;" \ 12.32 - "1:;" \ 12.33 - \ 12.34 - ".section .text.lock,\"ax\";" \ 12.35 - "2: pushl %%eax; pushl %%ecx; pushl %%edx;" \ 12.36 - "call %c1;" \ 12.37 - "popl %%edx; popl %%ecx; popl %%eax;" \ 12.38 - "jmp 1b;" \ 12.39 - ".previous;" \ 12.40 - \ 12.41 - : /* no output */ \ 12.42 - : "r" (ptr), "i" (do_softirq) \ 12.43 - /* no registers clobbered */ ); \ 12.44 -} while (0) 12.45 - 12.46 #endif /* __ASM_SOFTIRQ_H */
13.1 --- a/xen/include/xeno/ac_timer.h Thu Nov 13 16:34:35 2003 +0000 13.2 +++ b/xen/include/xeno/ac_timer.h Thu Nov 13 16:41:09 2003 +0000 13.3 @@ -67,6 +67,5 @@ static __inline__ int active_ac_timer(st 13.4 13.5 /* interface used by programmable timer, implemented hardware dependent */ 13.6 extern int reprogram_ac_timer(s_time_t timeout); 13.7 -extern void do_ac_timer(void); 13.8 13.9 #endif /* _AC_TIMER_H_ */
14.1 --- a/xen/include/xeno/netdevice.h Thu Nov 13 16:34:35 2003 +0000 14.2 +++ b/xen/include/xeno/netdevice.h Thu Nov 13 16:41:09 2003 +0000 14.3 @@ -466,19 +466,6 @@ extern int dev_ioctl(unsigned int cmd, 14.4 extern int dev_change_flags(struct net_device *, unsigned); 14.5 extern void dev_init(void); 14.6 14.7 -extern int netdev_nit; 14.8 - 14.9 -/* Post buffer to the network code from _non interrupt_ context. 14.10 - * see net/core/dev.c for netif_rx description. 14.11 - */ 14.12 -static inline int netif_rx_ni(struct sk_buff *skb) 14.13 -{ 14.14 - int err = netif_rx(skb); 14.15 - if (softirq_pending(smp_processor_id())) 14.16 - do_softirq(); 14.17 - return err; 14.18 -} 14.19 - 14.20 extern int netdev_finish_unregister(struct net_device *dev); 14.21 14.22 static inline void dev_put(struct net_device *dev)