Subject: Re: BUG: scheduling while atomic:

From: Scott Wood <[email-masked]>
Date: Wed, 5 Oct 2011 12:43:29 -0500

On 10/05/2011 06:24 AM, [email-masked] wrote:
> Hi Scoot,
> 
>  When my  ISR gets exeuted I get a below BUG. Could let me what I am
> doing wrong in the ISR?
>  
>  
>  BUG: scheduling while atomic: IRQ-20/0x0fff0000/108
> Call Trace:
> [C3AEFEC0] [C0007CCC]  (unreliable)
> [C3AEFEF0] [C0017F10]
> [C3AEFF00] [C0268818]
> [C3AEFF50] [C0017F44]
> [C3AEFF60] [C0018044]
> [C3AEFF70] [C0046A90]
> [C3AEFF90] [C0046D90]
> [C3AEFFC0] [C0032AFC]
> [C3AEFFF0] [C000F5AC]

This trace is useless without debugging symbols from your kernel image.
Please enable kallsyms.

> Below is the code :
> *My ISR*
> 
> irqreturn_t cpld_irq_handler(int irq, void * dev_id, struct pt_regs *regs)
> 
> {
> 
> wake_up(&cpld_intr_wait);
> 
> atomic_inc(&cpld_intr_data); /* incrementing this will indicate the
> poll() that the interrupt is occured */

None of this should schedule when run in interrupt context.

The only thing that comes to mind is possibly wake_up(), if you're
running the RT patch but somehow the interrupt isn't in a thread.

> return 0;

Not related, but return IRQ_HANDLED;

-Scott