Re: Protection of critical section in PREEMPT_RT

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

 



On 06.02.2013 02:59, Jacky Lam wrote:

> When driver code is reading the controller's registers and interrupt
> comes, interrupt handler (not the interrupt thread) need to clear the
> interrupt source first and return IRQ_WAKE_THREAD to wait for
> interrupt thread to actually handle the interrupt task. But in order
> to clear the interrupt source, I need to access the controller's
> internal registers. This is the problem I have now.

Maybe I am unterstanding this wrong, but shouldn't you unmask the
interrupt source when you are _done_ with processing the interrupt?

I have no real experience with interrupt driven drivers in RT-Linux,
but in other RTOSs I worked with this was the way to go -
the interrupt handler clears the source and schedules
the service thread but does not unmask the interrupt in question.
This is first done when the interrupt is processed.

That way you cannot be interrupted by the source you are
already processing. However, even that should IMHO work if the
locking is correct. Things can get complicated if you are
sharing interrupts between devices or if one device is accessed
with more drivers.

Do as Thomas is suggesting - turn all the CONFIG_DEBUG* on and
try with a non-RT kernel.

Regards
-- 
                                            Stano

--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux