test12-pre8 task queue fix batch
Subsystems (8)
PATCH 1/1 test12-pre8 task queue fix batch
Lets see if this is the gist of them...
Signature · 8 lines
=====================================================================
Mohammad A. Haque http://www.haque.net/
[email protected]
"Alcohol and calculus don't mix. Project Lead
Don't drink and derive." --Unknown http://wm.themes.org/
[email protected]
=====================================================================drivers/char/drm/gamma_dma.c +1 -1
@@ -651,7 +651,7 @@ dev->dma->next_queue =NULL ; dev->dma->this_buffer =NULL ; - dev->tq.next =NULL ; +INIT_LIST_HEAD (&dev->tq.list); dev->tq.sync =0 ; dev->tq.routine = gamma_dma_schedule_tq_wrapper; dev->tq.data = dev;
drivers/char/drm/i810_dma.c +1 -1
@@ -924,7 +924,7 @@ dev->dma->next_queue =NULL ; dev->dma->this_buffer =NULL ; - dev->tq.next =NULL ; +INIT_LIST_HEAD (&dev->tq.list); dev->tq.sync =0 ; dev->tq.routine = i810_dma_task_queue; dev->tq.data = dev;
drivers/char/drm/mga_dma.c +1 -1
@@ -818,7 +818,7 @@ dev->dma->next_buffer =NULL ; dev->dma->next_queue =NULL ; dev->dma->this_buffer =NULL ; - dev->tq.next =NULL ; +INIT_LIST_HEAD (&dev->tq.list); dev->tq.sync =0 ; dev->tq.routine = mga_dma_task_queue; dev->tq.data = dev;
drivers/char/n_r3964.c +2 -2
@@ -1157,12 +1157,12 @@* Add 'on_timer' to timer task queue * (will be called from timer bh) */ - pInfo->bh_1.next =NULL ; +INIT_LIST_HEAD (&pInfo->bh_1.list); pInfo->bh_1.sync =0 ; pInfo->bh_1.routine = &on_timer_1; pInfo->bh_1.data = pInfo; - pInfo->bh_2.next =NULL ; +INIT_LIST_HEAD (&pInfo->bh_2.list); pInfo->bh_2.sync =0 ; pInfo->bh_2.routine = &on_timer_2; pInfo->bh_2.data = pInfo;
drivers/char/scan_keyb.c +1 -1
@@ -120,7 +120,7 @@void __init scan_kbd_init (void ) { - task_scan_kbd.next=NULL ; +INIT_LIST_HEAD (task_scan_kbd.list); task_scan_kbd.sync=0 ; task_scan_kbd.routine=scan_kbd; task_scan_kbd.data=NULL ;
drivers/i2o/i2o_lan.c +7 -5
@@ -112,8 +112,10 @@ };static int lan_context; -static struct tq_struct i2o_post_buckets_task = { -0 ,0 , (void (*)(void *))i2o_lan_receive_post, (void *)0 +DECLARE_TASK_QUEUE (i2o_post_buckets_task); +struct tq_struct run_i2o_post_buckets_task = { + routine: (void (*)(void *)) run_task_queue, + data: (void *)0 };/* Functions to handle message failures and transaction errors:
@@ -379,8 +381,8 @@/* If DDM has already consumed bucket_thresh buckets, post new ones */ if (atomic_read (&priv->buckets_out) <= priv->max_buckets_out - priv->bucket_thresh) { - i2o_post_buckets_task.data = (void *)dev; -queue_task (&i2o_post_buckets_task, &tq_immediate); + run_i2o_post_buckets_task.data = (void *)dev; +queue_task (&run_i2o_post_buckets_task, &tq_immediate);mark_bh (IMMEDIATE_BH ); }
@@ -1401,7 +1403,7 @@atomic_set (&priv->tx_out,0 ); priv->tx_count =0 ; - priv->i2o_batch_send_task.next =NULL ; +INIT_LIST_HEAD (&priv->i2o_batch_send_task.list); priv->i2o_batch_send_task.sync =0 ; priv->i2o_batch_send_task.routine = (void *)i2o_lan_batch_send; priv->i2o_batch_send_task.data = (void *)dev;
drivers/ieee1394/guid.c +1 -1
@@ -163,7 +163,7 @@return ; } - greq->tq.next =NULL ; +INIT_LIST_HEAD (&greq->tq.list); greq->tq.sync =0 ; greq->tq.routine = (void (*)(void *))pkt_complete; greq->tq.data = greq;
drivers/ieee1394/ohci1394.c +1 -1
@@ -1585,7 +1585,7 @@/* initialize bottom handler */ d->task.sync =0 ; - d->task.next =NULL ; +INIT_LIST_HEAD (&d->task.list); d->task.routine = dma_rcv_bh; d->task.data = (void *)d;
drivers/isdn/pcbit/drv.c +1 -1
@@ -135,7 +135,7 @@ dev->b2->id =1 ; - dev->qdelivery.next =NULL ; +INIT_LIST_HEAD (&dev->qdelivery.list); dev->qdelivery.sync =0 ; dev->qdelivery.routine = pcbit_deliver; dev->qdelivery.data = dev;
drivers/net/acenic.c +1 -1
@@ -2223,7 +2223,7 @@/* * Setup the bottom half rx ring refill handler */ - ap->immediate.next =NULL ; +INIT_LIST_HEAD (&ap->immediate.list); ap->immediate.sync =0 ; ap->immediate.routine = (void *)(void *)ace_bh; ap->immediate.data = dev;
drivers/net/aironet4500_core.c +1 -1
@@ -2868,7 +2868,7 @@ priv->command_semaphore_on =0 ; priv->unlock_command_postponed =0 ; - priv->immediate_bh.next =NULL ; +INIT_LIST_HEAD (&priv->immediate_bh.list); priv->immediate_bh.sync =0 ; priv->immediate_bh.routine = (void *)(void *)awc_bh; priv->immediate_bh.data = dev;
drivers/net/plip.c +3 -3
@@ -349,18 +349,18 @@ nl->nibble =PLIP_NIBBLE_WAIT ;/* Initialize task queue structures */ - nl->immediate.next =NULL ; +INIT_LIST_HEAD (&nl->immediate.list); nl->immediate.sync =0 ; nl->immediate.routine = (void (*)(void *))plip_bh; nl->immediate.data = dev; - nl->deferred.next =NULL ; +INIT_LIST_HEAD (&nl->deferred.list); nl->deferred.sync =0 ; nl->deferred.routine = (void (*)(void *))plip_kick_bh; nl->deferred.data = dev;if (dev->irq ==-1 ) { - nl->timer.next =NULL ; +INIT_LIST_HEAD (&nl->timer.list); nl->timer.sync =0 ; nl->timer.routine = (void (*)(void *))plip_timer_bh; nl->timer.data = dev;
drivers/s390/net/ctc.c +1 -1
@@ -1313,7 +1313,7 @@return -ENOMEM ; }init_waitqueue_head (&privptr->channel[i].wait); - privptr->channel[i].tq.next =NULL ; +INIT_LIST_HEAD (&privptr->channel[i].tq.list); privptr->channel[i].tq.sync =0 ; privptr->channel[i].tq.routine = (void *)(void *)ctc_irq_bh; privptr->channel[i].tq.data = &privptr->channel[i];
drivers/sbus/audio/dmy.c +1 -1
@@ -547,7 +547,7 @@ dummy_chip->perchip_info.play.active =1 ;/* fake an "interrupt" to deal with this block */ - dummy_chip->tqueue.next =NULL ; +INIT_LIST_HEAD (&dummy_chip->tqueue.list); dummy_chip->tqueue.sync =0 ; dummy_chip->tqueue.routine = dummy_output_done_task; dummy_chip->tqueue.data = drv;
drivers/usb/serial/digi_acceleport.c +1 -1
@@ -1738,7 +1738,7 @@init_waitqueue_head ( &priv->dp_flush_wait ); priv->dp_in_close =0 ;init_waitqueue_head ( &priv->dp_close_wait ); - priv->dp_wakeup_task.next =NULL ; +INIT_LIST_HEAD (&priv->dp_wakeup_task.list); priv->dp_wakeup_task.sync =0 ; priv->dp_wakeup_task.routine = (void *)digi_wakeup_write_lock; priv->dp_wakeup_task.data = (void *)(&serial->port[i]);
drivers/usb/serial/keyspan_pda.c +2 -2
@@ -742,11 +742,11 @@if (!priv)return (1 );/* error */ init_waitqueue_head (&serial->port[0 ].write_wait); - priv->wakeup_task.next =NULL ; +INIT_LIST_HEAD (&priv->wakeup_task.list); priv->wakeup_task.sync =0 ; priv->wakeup_task.routine = (void *)keyspan_pda_wakeup_write; priv->wakeup_task.data = (void *)(&serial->port[0 ]); - priv->unthrottle_task.next =NULL ; +INIT_LIST_HEAD (&priv->unthrottle_task.list); priv->unthrottle_task.sync =0 ; priv->unthrottle_task.routine = (void *)keyspan_pda_request_unthrottle; priv->unthrottle_task.data = (void *)(serial);
fs/smbfs/sock.c +1 -1
@@ -163,7 +163,7 @@found_data (sk);return ; } - job->cb.next =NULL ; +INIT_LIST_HEAD (&job->cb.list); job->cb.sync =0 ; job->cb.routine = smb_data_callback; job->cb.data = job;
Quoted 1 line · Mohammad A. Haque
Lets see if this is the gist of them...
At least one more to fix:
diff -ru linux-2.4.0-test12-pre8/drivers/isdn/hisax/config.c linux/drivers/isdn/hisax/config.c
--- linux-2.4.0-test12-pre8/drivers/isdn/hisax/config.c Sun Dec 10 20:38:55 2000+++ linux/drivers/isdn/hisax/config.c Mon Dec 11 01:04:16 2000
@@ -1180,7 +1180,7 @@
cs->tx_skb = NULL;
cs->tx_cnt = 0;
cs->event = 0;
- cs->tqueue.next = 0;
+ INIT_LIST_HEAD(&cs->tqueue.list);
cs->tqueue.sync = 0;
cs->tqueue.data = cs;Regards
Ingo Oeser
Signature · 6 lines
10.+11.03.2001 - 3. Chemnitzer LinuxTag <http://www.tu-chemnitz.de/linux/tag>
<<<<<<<<<<<< come and join the fun >>>>>>>>>>>>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/More fixes. Ignore previous.
Quoted 2 lines · Mohammad A. Haque
Lets see if this is the gist of them...
Signature · 8 lines
=====================================================================
Mohammad A. Haque http://www.haque.net/
[email protected]
"Alcohol and calculus don't mix. Project Lead
Don't drink and derive." --Unknown http://wm.themes.org/
[email protected]
=====================================================================drivers/atm/ambassador.c +1 -1
@@ -2397,7 +2397,7 @@#ifdef FILL_RX_POOLS_IN_BH // initialise bottom half - dev->bh.next =0 ; +INIT_LIST_HEAD (&dev->bh.list); dev->bh.sync =0 ; dev->bh.routine = (void (*)(void *)) fill_rx_pools; dev->bh.data = dev;
drivers/char/drm/gamma_dma.c +1 -1
@@ -651,7 +651,7 @@ dev->dma->next_queue =NULL ; dev->dma->this_buffer =NULL ; - dev->tq.next =NULL ; +INIT_LIST_HEAD (&dev->tq.list); dev->tq.sync =0 ; dev->tq.routine = gamma_dma_schedule_tq_wrapper; dev->tq.data = dev;
drivers/char/drm/i810_dma.c +1 -1
@@ -924,7 +924,7 @@ dev->dma->next_queue =NULL ; dev->dma->this_buffer =NULL ; - dev->tq.next =NULL ; +INIT_LIST_HEAD (&dev->tq.list); dev->tq.sync =0 ; dev->tq.routine = i810_dma_task_queue; dev->tq.data = dev;
drivers/char/drm/mga_dma.c +1 -1
@@ -818,7 +818,7 @@ dev->dma->next_buffer =NULL ; dev->dma->next_queue =NULL ; dev->dma->this_buffer =NULL ; - dev->tq.next =NULL ; +INIT_LIST_HEAD (&dev->tq.list); dev->tq.sync =0 ; dev->tq.routine = mga_dma_task_queue; dev->tq.data = dev;
drivers/char/n_r3964.c +2 -2
@@ -1157,12 +1157,12 @@* Add 'on_timer' to timer task queue * (will be called from timer bh) */ - pInfo->bh_1.next =NULL ; +INIT_LIST_HEAD (&pInfo->bh_1.list); pInfo->bh_1.sync =0 ; pInfo->bh_1.routine = &on_timer_1; pInfo->bh_1.data = pInfo; - pInfo->bh_2.next =NULL ; +INIT_LIST_HEAD (&pInfo->bh_2.list); pInfo->bh_2.sync =0 ; pInfo->bh_2.routine = &on_timer_2; pInfo->bh_2.data = pInfo;
drivers/char/scan_keyb.c +1 -1
@@ -120,7 +120,7 @@void __init scan_kbd_init (void ) { - task_scan_kbd.next=NULL ; +INIT_LIST_HEAD (task_scan_kbd.list); task_scan_kbd.sync=0 ; task_scan_kbd.routine=scan_kbd; task_scan_kbd.data=NULL ;
drivers/i2o/i2o_lan.c +7 -5
@@ -112,8 +112,10 @@ };static int lan_context; -static struct tq_struct i2o_post_buckets_task = { -0 ,0 , (void (*)(void *))i2o_lan_receive_post, (void *)0 +DECLARE_TASK_QUEUE (i2o_post_buckets_task); +struct tq_struct run_i2o_post_buckets_task = { + routine: (void (*)(void *)) run_task_queue, + data: (void *)0 };/* Functions to handle message failures and transaction errors:
@@ -379,8 +381,8 @@/* If DDM has already consumed bucket_thresh buckets, post new ones */ if (atomic_read (&priv->buckets_out) <= priv->max_buckets_out - priv->bucket_thresh) { - i2o_post_buckets_task.data = (void *)dev; -queue_task (&i2o_post_buckets_task, &tq_immediate); + run_i2o_post_buckets_task.data = (void *)dev; +queue_task (&run_i2o_post_buckets_task, &tq_immediate);mark_bh (IMMEDIATE_BH ); }
@@ -1401,7 +1403,7 @@atomic_set (&priv->tx_out,0 ); priv->tx_count =0 ; - priv->i2o_batch_send_task.next =NULL ; +INIT_LIST_HEAD (&priv->i2o_batch_send_task.list); priv->i2o_batch_send_task.sync =0 ; priv->i2o_batch_send_task.routine = (void *)i2o_lan_batch_send; priv->i2o_batch_send_task.data = (void *)dev;
drivers/ieee1394/guid.c +1 -1
@@ -163,7 +163,7 @@return ; } - greq->tq.next =NULL ; +INIT_LIST_HEAD (&greq->tq.list); greq->tq.sync =0 ; greq->tq.routine = (void (*)(void *))pkt_complete; greq->tq.data = greq;
drivers/ieee1394/ohci1394.c +1 -1
@@ -1585,7 +1585,7 @@/* initialize bottom handler */ d->task.sync =0 ; - d->task.next =NULL ; +INIT_LIST_HEAD (&d->task.list); d->task.routine = dma_rcv_bh; d->task.data = (void *)d;
drivers/isdn/hisax/config.c +1 -1
@@ -1180,7 +1180,7 @@ cs->tx_skb =NULL ; cs->tx_cnt =0 ; cs->event =0 ; - cs->tqueue.next =0 ; +INIT_LIST_HEAD (&cs->tqueue.list); cs->tqueue.sync =0 ; cs->tqueue.data = cs;
drivers/isdn/hisax/isdnl1.c +1 -1
@@ -343,7 +343,7 @@ bcs->cs = cs; bcs->channel = bc; - bcs->tqueue.next =0 ; +INIT_LIST_HEAD (&bcs->tqueue.list); bcs->tqueue.sync =0 ; bcs->tqueue.routine = (void *) (void *) BChannel_bh; bcs->tqueue.data = bcs;
drivers/isdn/hysdn/boardergo.c +1 -1
@@ -458,7 +458,7 @@ card->writebootseq = ergo_writebootseq; card->waitpofready = ergo_waitpofready; card->set_errlog_state = ergo_set_errlog_state; - card->irq_queue.next =0 ; +INIT_LIST_HEAD (&card->irq_queue.list); card->irq_queue.sync =0 ; card->irq_queue.data = card;/* init task queue for interrupt */ card->irq_queue.routine = (void *) (void *) ergo_irq_bh;
drivers/isdn/pcbit/drv.c +1 -1
@@ -135,7 +135,7 @@ dev->b2->id =1 ; - dev->qdelivery.next =NULL ; +INIT_LIST_HEAD (&dev->qdelivery.list); dev->qdelivery.sync =0 ; dev->qdelivery.routine = pcbit_deliver; dev->qdelivery.data = dev;
drivers/net/acenic.c +1 -1
@@ -2223,7 +2223,7 @@/* * Setup the bottom half rx ring refill handler */ - ap->immediate.next =NULL ; +INIT_LIST_HEAD (&ap->immediate.list); ap->immediate.sync =0 ; ap->immediate.routine = (void *)(void *)ace_bh; ap->immediate.data = dev;
drivers/net/aironet4500_core.c +1 -1
@@ -2868,7 +2868,7 @@ priv->command_semaphore_on =0 ; priv->unlock_command_postponed =0 ; - priv->immediate_bh.next =NULL ; +INIT_LIST_HEAD (&priv->immediate_bh.list); priv->immediate_bh.sync =0 ; priv->immediate_bh.routine = (void *)(void *)awc_bh; priv->immediate_bh.data = dev;
drivers/net/plip.c +3 -3
@@ -349,18 +349,18 @@ nl->nibble =PLIP_NIBBLE_WAIT ;/* Initialize task queue structures */ - nl->immediate.next =NULL ; +INIT_LIST_HEAD (&nl->immediate.list); nl->immediate.sync =0 ; nl->immediate.routine = (void (*)(void *))plip_bh; nl->immediate.data = dev; - nl->deferred.next =NULL ; +INIT_LIST_HEAD (&nl->deferred.list); nl->deferred.sync =0 ; nl->deferred.routine = (void (*)(void *))plip_kick_bh; nl->deferred.data = dev;if (dev->irq ==-1 ) { - nl->timer.next =NULL ; +INIT_LIST_HEAD (&nl->timer.list); nl->timer.sync =0 ; nl->timer.routine = (void (*)(void *))plip_timer_bh; nl->timer.data = dev;
drivers/s390/net/ctc.c +1 -1
@@ -1313,7 +1313,7 @@return -ENOMEM ; }init_waitqueue_head (&privptr->channel[i].wait); - privptr->channel[i].tq.next =NULL ; +INIT_LIST_HEAD (&privptr->channel[i].tq.list); privptr->channel[i].tq.sync =0 ; privptr->channel[i].tq.routine = (void *)(void *)ctc_irq_bh; privptr->channel[i].tq.data = &privptr->channel[i];
drivers/sbus/audio/dmy.c +1 -1
@@ -547,7 +547,7 @@ dummy_chip->perchip_info.play.active =1 ;/* fake an "interrupt" to deal with this block */ - dummy_chip->tqueue.next =NULL ; +INIT_LIST_HEAD (&dummy_chip->tqueue.list); dummy_chip->tqueue.sync =0 ; dummy_chip->tqueue.routine = dummy_output_done_task; dummy_chip->tqueue.data = drv;
drivers/usb/serial/digi_acceleport.c +1 -1
@@ -1738,7 +1738,7 @@init_waitqueue_head ( &priv->dp_flush_wait ); priv->dp_in_close =0 ;init_waitqueue_head ( &priv->dp_close_wait ); - priv->dp_wakeup_task.next =NULL ; +INIT_LIST_HEAD (&priv->dp_wakeup_task.list); priv->dp_wakeup_task.sync =0 ; priv->dp_wakeup_task.routine = (void *)digi_wakeup_write_lock; priv->dp_wakeup_task.data = (void *)(&serial->port[i]);
drivers/usb/serial/keyspan_pda.c +2 -2
@@ -742,11 +742,11 @@if (!priv)return (1 );/* error */ init_waitqueue_head (&serial->port[0 ].write_wait); - priv->wakeup_task.next =NULL ; +INIT_LIST_HEAD (&priv->wakeup_task.list); priv->wakeup_task.sync =0 ; priv->wakeup_task.routine = (void *)keyspan_pda_wakeup_write; priv->wakeup_task.data = (void *)(&serial->port[0 ]); - priv->unthrottle_task.next =NULL ; +INIT_LIST_HEAD (&priv->unthrottle_task.list); priv->unthrottle_task.sync =0 ; priv->unthrottle_task.routine = (void *)keyspan_pda_request_unthrottle; priv->unthrottle_task.data = (void *)(serial);
fs/smbfs/sock.c +1 -1
@@ -163,7 +163,7 @@found_data (sk);return ; } - job->cb.next =NULL ; +INIT_LIST_HEAD (&job->cb.list); job->cb.sync =0 ; job->cb.routine = smb_data_callback; job->cb.data = job;
Quoted 1 line · Mohammad A. Haque
More fixes. Ignore previous.
drivers/atm/ambassador.c +1 -1
@@ -2397,7 +2397,7 @@#ifdef FILL_RX_POOLS_IN_BH // initialise bottom half - dev->bh.next =0 ; +INIT_LIST_HEAD (&dev->bh.list); dev->bh.sync =0 ; dev->bh.routine = (void (*)(void *)) fill_rx_pools; dev->bh.data = dev;
Quoted 1 line
(and so on)
I don't think this is the right fix. First of all, if one needed to the INIT_LIST_HEAD, some new macro should be introduced (INIT_TASK or something), which takes care of the .list and .sync structures. So when something was about to change again in the future, you wouldn't have to go through all the files and fix them again.
But: The INIT_LIST_HEAD is unnecessary and misleading at least, because tqueue->list is not a list head, it's there to allow for adding the struct tqueue onto a task_queue. So we have the task_queue, that's the list head
- it needs to be initialized, and that's already done via DECLARE_TASK_QUEUE. Then we have tasks to be added to the list (struct tqueue), their .list members don't need to be initialized because they get set when the task is queued on a task_queue (in queue_task).
So I think the correct fix is just to remove the offending lines.
--Kai
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/