linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* BUG: scheduling while atomic:
@ 2011-10-05 11:24 smitha.vanga
  2011-10-05 16:05 ` David Laight
  2011-10-05 17:43 ` BUG: " Scott Wood
  0 siblings, 2 replies; 11+ messages in thread
From: smitha.vanga @ 2011-10-05 11:24 UTC (permalink / raw)
  To: scottwood; +Cc: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 2371 bytes --]

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]


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 */

return 0;

}

DRIVER_INIT
static int __init gpio_init(void)
{
        int ret = 0;
        int virq;


    atomic_set(&cpld_intr_data, 0);                     /* initialize the Interrupt indicator */
    init_waitqueue_head(&cpld_intr_wait);               /* Initialize the wait queue */

    virq = irq_create_mapping(NULL, CPLD1_INTERRUPT);


   if ((ret = request_irq(virq,cpld_irq_handler, 0, GPIO_CHAR_PATH, NULL))!=0)
   {
      printk(KERN_ERR "gpio_init: Could not grab IRQ line for CPLD ret = %d\n",ret);
          goto err1;
   }


        if((s_nGPIOMajor = register_chrdev(MPC8247_DEVICE_MAJOR_NUM, GPIO_CHAR_PATH, &gpio_fops))<0)
        {
                GPIO_DBG2("GPIO_DRIVER  : unable to get major %d\n", s_nGPIOMajor);
                return s_nGPIOMajor;

        }else{
                GPIO_DBG2("GPIO_DRIVER  : major = %x\n", s_nGPIOMajor );
        }

        return 0;

}

Thanks in Advance

Regards,
Smitha

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. 

www.wipro.com

[-- Attachment #2: Type: text/html, Size: 5576 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-10-18  8:06 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-05 11:24 BUG: scheduling while atomic: smitha.vanga
2011-10-05 16:05 ` David Laight
2011-10-05 17:43 ` BUG: " Scott Wood
2011-10-08 12:51   ` smitha.vanga
2011-10-14  4:14   ` I2c-cpm drievr not working smitha.vanga
2011-10-14  5:42     ` Bhushan Bharat-R65777
2011-10-14 10:02       ` I2c-cpm driver " smitha.vanga
2011-10-17  3:58         ` Bhushan Bharat-R65777
2011-10-17  8:17           ` smitha.vanga
2011-10-18  4:05             ` Bhushan Bharat-R65777
2011-10-18  8:05               ` IRQ2 and IRQ 3 smitha.vanga

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).