Mailing List archive

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

[linux-dvb] need help with spinlocks



Hello everyone,

I am looking for somebody to help me debug a spin lock in the pinnacle
driver.

The Problem:
- I have a circular buffer for the DMA engine. Whenever a buffer segment is
  filled, an interrupt occurs.
- The interrupt handler updates the "head" pointer of the buffer and
  schedules a tasklet
- The tasklet needs to access the "head" pointer several times.
- The "head" pointer is protected by a spinlock. Whenever the tasklet starts
  accessing it, it calls spin_lock_irq. When it is done, it calls
  spin_unlock_irq. When the interrupt handler starts to update the variable,
  it calls spin_lock, and when it is done it calls spin_unlock.
- This works well on a UP kernel. But when using a SMP kernel, it seems to
  fail, the kernel hangs.

What am I missing?

If anyone wants to look at the original code: the irq handler is in bt878.c,
the tasklet in pctv.c

Best regards,
Peter Hettkamp
-- 
"Only wimps use tape backup: _real_ men just upload their important stuff
on ftp, and let the rest of the world mirror it ;)"
(Linus Torvalds, about his failing hard drive on linux.cs.helsinki.fi)


-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index