lkml.org 
[lkml]   [1999]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.031 / U:0.908 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site