Messages in this thread | | | Date | Fri, 13 Aug 1999 09:42:37 -0400 | From | Mark Lord <> | Subject | Re: weird code in drivers/block/ide.c |
| |
Manfred Spraul wrote: > > ide_intr() first calls "__cli()", then spin_lock_irqsave(). .. > > void ide_intr (int irq, void *dev_id, struct pt_regs *regs) > > { > > unsigned long flags; > > ide_hwgroup_t *hwgroup = (ide_hwgroup_t *)dev_id; > > ide_hwif_t *hwif; > > ide_drive_t *drive; > > ide_handler_t *handler; > > > > __cli(); /* local CPU only */ > > spin_lock_irqsave(&hwgroup->spinlock, flags); > > hwif = hwgroup->hwif;
I don't really look after this stuff anymore, but one should be exceptionally careful when fiddling with the interrupt code in the IDE stuff.
The driver is currently multi-CPU, multi-IRQ, and multi-thread capable & safe, and "If it ain't broke, don't fix it" applies here, especially at such a late hour in the development cycle.
I suspect I had a darned good reason for the seemingly "extra" __cli() at the time, but I'm not looking too close at it anymore. Taking it out will likely break something.. and when the IDE breaks, it could destroy filesystems.. -- Mark Lord Real-Time Remedies Inc. mlord@pobox.com
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |