lkml.org 
[lkml]   [2008]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] uio: uio_pdrv_genirq V2

> > + else if (!irq_on && !priv->irq_disabled)
> > + disable_irq(dev_info->irq);
> I'm not sure if this is a problem on SMP. Should you use
> disable_irq_nosync here, too? Probably it's OK.

That one will also deadlock.

The easiest fix is probably to use test_and_set and friends for each I/O
operation. You would then not need the lock to protect ->irq_disabled.
Propogating that throughout means your user space has to handle the case
of an IRQ arriving after disable returns but would be a fair bit saner I
think ?


\
 
 \ /
  Last update: 2008-07-10 11:21    [W:0.148 / U:9.928 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site