From linux-arm-kernel Mon May 23 15:23:17 2005 From: Matthias Welwarsky Date: Mon, 23 May 2005 15:23:17 +0000 To: linux-arm-kernel Subject: Re: interrupt from interrupt Message-Id: <200505231723.17266.mwelwarsky () web ! de> X-MARC-Message: https://marc.info/?l=linux-arm-kernel&m=111686195312537 On Monday 23 May 2005 09:37, Thomas Surrel wrote: > Hi, > > I'm using a 2.4.27 kernel on a AT91RM9200. > I'm trying to trigger a SPI tranfer when i receive an interrupt on a > port. But i get a "Scheduling in interrupt" error if i do this on the > interrupt routine, or in a tasklet. > > I guess the problem is that the SPI transfert uses interrupts itself, as > it calls wait_on_completion() at the start of the transfer, and > complete() in an interrupt routine. You cannot do wait_on_completion() from an interrupt, it might sleep. > So, what mechanism would allow me to trigger a function involving > interrupts from an interrupt routine ? A kernel thread sleeping on a request queue, being woken up from the from the interrupt service. > > Thanks in advance for any help ! > > Thomas > > ------------------------------------------------------------------- > List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel > FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php > Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php ------------------------------------------------------------------- List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php