cli/sti removal from linux-2.5.29/drivers/ide?
Quoted 11 lines · Martin Dalecki
Quoted 8 lines · Adam J. Richter
That said, I think all the "lock group" logic in
drivers/ide
may be useless, and it would be pretty straightforward to delete all that code, haveata_channel->lockbe a lock rather than a pointer to one, and have it be initialized before that first call toch->tuneproc, in which case we could just have interrupts off andch->lockheld in all cases whench->tuneprocis called. I did not want to do this in my patch, because I wanted to keep my patch as small as possible, but perhaps it would be worth doing now just to simplify the rules for callingch->tuneproc.
Quoted 2 lines
Not quite. It's not that easy becouse the same lock is used by the BIO layer to synchronize between for example master and slave devices.
Master and slave devices share the same channel, so master->channel == slave->channel &master->channel->lock == &slave->channel->lock So their queue->lock pointer would continue to point to
the same lock: &channel->lock.
Quoted 2 lines
There are other problems with this but right now you can hardly do something about it.
I'd be intersted in knowing what one of those other problems
is. Otherwise, I don't understand why I can't eliminate the "lock group" stuff.
Adam J. Richter __ ______________ 575 Oroville Road [email protected] \ / Milpitas, California 95035 +1 408 309-6081 | g g d r a s i l United States of America
"Free Software For The Rest Of Us."
Quoted 28 lines · Adam J. Richter
Quoted 13 lines · Martin Dalecki
Quoted 8 lines · Adam J. Richter
That said, I think all the "lock group" logic in
drivers/ide
may be useless, and it would be pretty straightforward to delete all that code, haveata_channel->lockbe a lock rather than a pointer to one, and have it be initialized before that first call toch->tuneproc, in which case we could just have interrupts off andch->lockheld in all cases whench->tuneprocis called. I did not want to do this in my patch, because I wanted to keep my patch as small as possible, but perhaps it would be worth doing now just to simplify the rules for callingch->tuneproc.Quoted 2 lines
Not quite. It's not that easy becouse the same lock is used by the BIO layer to synchronize between for example master and slave devices.
Master and slave devices share the same channel, so master->channel == slave->channel &master->channel->lock == &slave->channel->lock So their queue->lock pointer would continue to point tothe same lock:
&channel->lock.
Quoted 6 lines
Quoted 1 line
There are other problems with this but right now you can hardly do something about it.
I'd be intersted in knowing what one of those other problems
is. Otherwise, I don't understand why I can't eliminate the "lock group" stuff.
Please have a look at the usage of the QUEU_FLAG_STOPPED in the reuquest_queue struct. Lock is shared -> flag guaring it is not. Just one example. *But* if you can make the whole noting of shared locks go away -> then go ahead for it. I would be glad to see it working.