Block driver question (MPC852 with DoC)

deepesh at india.tejasnetworks.com deepesh at india.tejasnetworks.com
Fri Jun 16 18:37:18 EST 2006


Processor: MPC852
OS : linuxppc-2.4.20 from denx
DoC: Disk On Chip, A block device.


We are using DiskOnChip on our board. And we have got a block driver from
the vendor, which can be insmoded.

The request function of the block driver:
DeviceRequest() {
   some error checkings;
   list_add_tail(&queue,&requestsList);
   wake_up(&waitQueueHead);
}

There is an kernel thread which does the final block read-writes to the
disk on chip:

IOKernelThread() {
    while(1) {
       set_current_state(TASK_INTERRUPTIBLE);
       interruptible_sleep_on_timeout(&waitQueueHead,1);
       while(!list_empty(&requestsList)) {
          read/write to the disk;
          list_del(&queue);
       }
    }

}

The list manipulations happen in the DeviceRequest and the IOKernelThread.
Is there a potential chance of a race condition, when a timer interrupt
occurs?

Thank you,
Deepesh





More information about the Linuxppc-dev mailing list