Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: SMP problems with dvb-ttpci (was: Re: testing refactored drivers)



Johannes Stezenbach writes:
 > I wrote:
 > > Michael Hunold wrote:
 > > > On 18.10.2004 17:15, syrius.ml@no-log.org wrote:
 > > > >kernel: DEBI irq oops @ 2819257, psr:0x00040128, ssr:0x00800030
 > > > >kernel: dvb-ttpci: GPIO0 irq oops @ 2819322, psr:0x00040020,
 > > > >ssr:0x00800030
 > ...
 > > > To solve this problem, the gpio and debi handling must be unified again, 
 > > > as it was with previous versions of the drivers, where the handling was 
 > > > done inside the irq handler directly. Both functions should be put 
 > > > inside on tasklet, but this is not trivial.
 > > 
 > > The specific problem here seems to be that the debi irq happens before
 > > av7110->debitype is valid. Maybe this could be solved by declaring
 > > it volatile (along with a few other related variables shared between the
 > > two tasklets), and adding a wmb() after the assignments and before the
 > > debi transfer is started.
 > 
 > OTOH, the way the host/firmware protocol is designed there is no
 > advantage having two tasklets. The whole problem could be avoided
 > by having one tasklet for both irqs. The only difficulty is to
 > pass the isr value from av7110_irq() to the tasklet in a safe
 > way.


If you reduce the number of debi port accesses you can keep almost 
the whole stuff in IRQ without causing much delay (maybe in total even
less than if you always schedule a tasklet) and you only have to put the 
packet reception part of the debi IRQ into a tasklet.
I did this in my driver version and this can probably be further
optimized to have only one debi access (you need that anyway to 
clear the IRQ) in almost all cases.


Ralph







Home | Main Index | Thread Index