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

Re: [rtl] RT-Linux interrupts.



In message <200111080749.fA87nBw03498@hofr.at> <der.herr@hofr.at> wrote:
> 
> I guess the problem ist that SCCx + SMCx are all one interrupt to the core
> comming from the CPM, so you can't catch the SCC1 interrupt but you must
> catch the CPM interrupt and in case it is the SCC1 handle it if not pass
> it on to Linux for handling. If you catch the CPM interrupt with an rt-handler
> then you will have to take care of checking the devices on the CPM so I 
> don't think this can be done without changing the CPM related code.

It's even worse if you have to serve "RT" and "normal" interrupts  on
CPM  devices.  The  current  implementation for a CPM interrupt works
something like that:

  1. get, ack and disable SIU IRQ
  2. call CPM handler
  3.   get, ack and disable CPM Source
  4.   call handler for CPM Source
  5.   re-enable CPM Source
  6. re-enable SIU IRQ

In a RT environment you don't want to wait until Linux re-enables the
SIU interrupts (6) [because all  CPM  interrupts  are  blocked  until
then],  but  on  the  other  hand you can re-enable an interrupt only
after it has been served.


We changed the interrupt handling to allow for RT interrupts from CPM
devices under RTAI; the proposal  was  posted  to  the  PPC  Embedded
mailing  list.  However,  for  the known reasons we did this for RTAI
only.
(see http://lists.linuxppc.org/linuxppc-embedded/200110/msg00305.html)

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
I have often regretted my speech, never my silence.