lkml.org 
[lkml]   [2002]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [announce, patch, RFC] "big IRQ lock" removal, IRQ cleanups.

Martin,

On Sat, 20 Jul 2002, Marcin Dalecki wrote:

> Well I would like to allow myself to allow a tad bit of advocacy for
> this step.

the attached patch was a quick hack to get rid of the global cli() from
drivers/ide/main.c - but it's obviously broken and i'd like to fix it.

how can this be done cleanly - should we do a:

synchronize_irq(drive->channel->irq);

before unregistering the driver?

this might not even be necessery i believe, since the implicit (?)
free_irq() synchronizes with all pending instances of that interrupt
source.

is there something else i'm missing, something else we need to synchronize
with - perhaps the timers?

Ingo

--- linux/drivers/ide/main.c.orig Sun Jul 21 20:37:12 2002
+++ linux/drivers/ide/main.c Sun Jul 21 21:06:28 2002
@@ -1091,18 +1091,18 @@
{
unsigned long flags;

- save_flags(flags); /* all CPUs */
- cli(); /* all CPUs */
+ __save_flags(flags); // FIXME: is this safe?
+ __cli();

#if 0
if (__MOD_IN_USE(ata_ops(drive)->owner)) {
- restore_flags(flags);
+ __restore_flags(flags); // FIXME: is this safe?
return 1;
}
#endif

if (drive->usage || drive->busy || !ata_ops(drive)) {
- restore_flags(flags); /* all CPUs */
+ __restore_flags(flags); // FIXME: is this safe?
return 1;
}

@@ -1111,7 +1111,7 @@
#endif
drive->driver = NULL;

- restore_flags(flags); /* all CPUs */
+ __restore_flags(flags); // FIXME: is this safe?

return 0;
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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