All of lore.kernel.org
 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; 13+ 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] 13+ messages in thread
* BUG: scheduling while atomic: ..
@ 2009-09-20 11:54 Kelly Bowa
  2009-09-20 12:35 ` Kelly Bowa
  0 siblings, 1 reply; 13+ messages in thread
From: Kelly Bowa @ 2009-09-20 11:54 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Eric Paris, Andrew Morton, Thomas Gleixner,
	Jens Axboe

hi,
found following bug in 2.6.31-rc8. CPU model is Intel(R) Atom(TM) CPU N270. This is produced at boot time. I havent had time to look into this yet but looks like an ACPI bug to me..

<6>Checking 'hlt' instruction... OK.
<6>ACPI: Core revision 20090521
<3>BUG: scheduling while atomic: swapper/0/0x10000002
<4>Modules linked in:
<4>Pid: 0, comm: swapper Not tainted 2.6.31-git #3
<4>Call Trace:
<4> [<c0129e92>] __schedule_bug+0x4d/0x52
<4> [<c03a0354>] schedule+0x97/0xa6b
<4> [<c01b8e4a>] ? __slab_free+0xd7/0x2ab
<4> [<c01bf271>] ? put_object+0x3a/0x3d
<4> [<c02ce4d8>] ? acpi_debug_print+0xa/0xc2
<4> [<c02cb15d>] ? acpi_ps_pop_scope+0x79/0x84
<4> [<c02ce4d8>] ? acpi_debug_print+0xa/0xc2
<4> [<c012ba43>] __cond_resched+0x17/0x23
<4> [<c03a0e2e>] _cond_resched+0x20/0x2b
<4> [<c02ca71c>] acpi_ps_complete_op+0x214/0x223
<4> [<c02c9a8d>] ? acpi_ps_get_next_simple_arg+0xe0/0xeb
<4> [<c02cad98>] acpi_ps_parse_loop+0x66d/0x7bd
<4> [<c02ca089>] acpi_ps_parse_aml+0xd4/0x324
<4> [<c02c909a>] acpi_ns_one_complete_parse+0x10e/0x124
<4> [<c02c90e9>] acpi_ns_parse_table+0x39/0x78
<4> [<c02c5f57>] acpi_ns_load_table+0x63/0xe0
<4> [<c02ccea6>] acpi_load_tables+0x6b/0x13e
<4> [<c05606d1>] acpi_early_init+0x5d/0xeb
<4> [<c054180c>] start_kernel+0x2ce/0x2dd
<4> [<c0541091>] __init_begin+0x91/0x96
<3>BUG: scheduling while atomic: swapper/0/0x10000002
<4>Modules linked in:
<4>Pid: 0, comm: swapper Not tainted 2.6.31-git #3
<4>Call Trace:
<4> [<c0129e92>] __schedule_bug+0x4d/0x52
<4> [<c03a0354>] schedule+0x97/0xa6b
<4> [<c01b8e4a>] ? __slab_free+0xd7/0x2ab
<4> [<c01bf271>] ? put_object+0x3a/0x3d
<4> [<c02ce4d8>] ? acpi_debug_print+0xa/0xc2
<4> [<c02cb15d>] ? acpi_ps_pop_scope+0x79/0x84
<4> [<c02ce4d8>] ? acpi_debug_print+0xa/0xc2
<4> [<c012ba43>] __cond_resched+0x17/0x23
<4> [<c03a0e2e>] _cond_resched+0x20/0x2b
<4> [<c02ca71c>] acpi_ps_complete_op+0x214/0x223
<4> [<c02cad98>] acpi_ps_parse_loop+0x66d/0x7bd
<4> [<c02ca089>] acpi_ps_parse_aml+0xd4/0x324
<4> [<c02c909a>] acpi_ns_one_complete_parse+0x10e/0x124
<4> [<c02c90e9>] acpi_ns_parse_table+0x39/0x78
<4> [<c02c5f57>] acpi_ns_load_table+0x63/0xe0
<4> [<c02ccea6>] acpi_load_tables+0x6b/0x13e
<4> [<c05606d1>] acpi_early_init+0x5d/0xeb
<4> [<c054180c>] start_kernel+0x2ce/0x2dd
<4> [<c0541091>] __init_begin+0x91/0x96
<3>BUG: scheduling while atomic: swapper/0/0x10000002
<4>Modules linked in:
<4>Pid: 0, comm: swapper Not tainted 2.6.31-git #3
<4>Call Trace:
<4> [<c0129e92>] __schedule_bug+0x4d/0x52
<4> [<c03a0354>] schedule+0x97/0xa6b
<4> [<c01b8e4a>] ? __slab_free+0xd7/0x2ab
<4> [<c01bf271>] ? put_object+0x3a/0x3d
<4> [<c02ce4d8>] ? acpi_debug_print+0xa/0xc2
<4> [<c02cb15d>] ? acpi_ps_pop_scope+0x79/0x84
<4> [<c02ce4d8>] ? acpi_debug_print+0xa/0xc2
<4> [<c012ba43>] __cond_resched+0x17/0x23
<4> [<c03a0e2e>] _cond_resched+0x20/0x2b
<4> [<c02ca71c>] acpi_ps_complete_op+0x214/0x223
<4> [<c02cad98>] acpi_ps_parse_loop+0x66d/0x7bd
<4> [<c02ca089>] acpi_ps_parse_aml+0xd4/0x324
<4> [<c02c909a>] acpi_ns_one_complete_parse+0x10e/0x124
<4> [<c02c90e9>] acpi_ns_parse_table+0x39/0x78
<4> [<c02c5f57>] acpi_ns_load_table+0x63/0xe0
<4> [<c02ccea6>] acpi_load_tables+0x6b/0x13e
<4> [<c05606d1>] acpi_early_init+0x5d/0xeb
<4> [<c054180c>] start_kernel+0x2ce/0x2dd
<4> [<c0541091>] __init_begin+0x91/0x96
<3>BUG: scheduling while atomic: swapper/0/0x10000002
<4>Modules linked in:
<4>Pid: 0, comm: swapper Not tainted 2.6.31-git #3
<4>Call Trace:
<4> [<c0129e92>] __schedule_bug+0x4d/0x52
<4> [<c03a0354>] schedule+0x97/0xa6b
<4> [<c01b7e49>] ? init_object+0xe/0x67
<4> [<c03a49d1>] ? sub_preempt_count+0x9/0x9f
<4> [<c01ba21f>] ? kmem_cache_free+0x85/0xd5
<4> [<c02abae5>] ? acpi_os_release_object+0xd/0x11
<4> [<c02abae5>] ? acpi_os_release_object+0xd/0x11
<4> [<c02abae5>] ? acpi_os_release_object+0xd/0x11
<4> [<c02cb2c3>] ? acpi_ps_free_op+0x51/0x56
<4> [<c02cafd0>] ? acpi_ps_delete_parse_tree+0x38/0x50
<4> [<c012ba43>] __cond_resched+0x17/0x23
<4> [<c03a0e2e>] _cond_resched+0x20/0x2b
<4> [<c02ca71c>] acpi_ps_complete_op+0x214/0x223
<4> [<c02b8ab9>] ? acpi_ds_load2_end_op+0x1b3/0x3f6
<4> [<c02cad98>] acpi_ps_parse_loop+0x66d/0x7bd
<4> [<c02ca089>] acpi_ps_parse_aml+0xd4/0x324
<4> [<c02c909a>] acpi_ns_one_complete_parse+0x10e/0x124
<4> [<c02c911b>] acpi_ns_parse_table+0x6b/0x78
<4> [<c02c5f57>] acpi_ns_load_table+0x63/0xe0
<4> [<c02ccea6>] acpi_load_tables+0x6b/0x13e
<4> [<c05606d1>] acpi_early_init+0x5d/0xeb
<4> [<c054180c>] start_kernel+0x2ce/0x2dd
<4> [<c0541091>] __init_begin+0x91/0x96
<3>BUG: scheduling while atomic: swapper/0/0x10000002
<4>Modules linked in:
<4>Pid: 0, comm: swapper Not tainted 2.6.31-git #3
<4>Call Trace:
<4> [<c0129e92>] __schedule_bug+0x4d/0x52
<4> [<c03a0354>] schedule+0x97/0xa6b
<4> [<c01b8e4a>] ? __slab_free+0xd7/0x2ab
<4> [<c01bf271>] ? put_object+0x3a/0x3d
<4> [<c02ce4d8>] ? acpi_debug_print+0xa/0xc2
<4> [<c02cb15d>] ? acpi_ps_pop_scope+0x79/0x84
<4> [<c02ce4d8>] ? acpi_debug_print+0xa/0xc2
<4> [<c012ba43>] __cond_resched+0x17/0x23
<4> [<c03a0e2e>] _cond_resched+0x20/0x2b
<4> [<c02ca71c>] acpi_ps_complete_op+0x214/0x223
<4> [<c02cb21c>] ? acpi_ps_init_op+0x8/0x12
<4> [<c02c9a8d>] ? acpi_ps_get_next_simple_arg+0xe0/0xeb
<4> [<c02cad98>] acpi_ps_parse_loop+0x66d/0x7bd
<4> [<c02ca089>] acpi_ps_parse_aml+0xd4/0x324
<4> [<c02c909a>] acpi_ns_one_complete_parse+0x10e/0x124
<4> [<c02c911b>] acpi_ns_parse_table+0x6b/0x78
<4> [<c02c5f57>] acpi_ns_load_table+0x63/0xe0
<4> [<c02ccea6>] acpi_load_tables+0x6b/0x13e
<4> [<c05606d1>] acpi_early_init+0x5d/0xeb
<4> [<c054180c>] start_kernel+0x2ce/0x2dd
<4> [<c0541091>] __init_begin+0x91/0x96
<3>BUG: scheduling while atomic: swapper/0/0x10000002
<4>Modules linked in:
<4>Pid: 0, comm: swapper Not tainted 2.6.31-git #3
<4>Call Trace:
<4> [<c0129e92>] __schedule_bug+0x4d/0x52
<4> [<c03a0354>] schedule+0x97/0xa6b
<4> [<c01b7e49>] ? init_object+0xe/0x67
<4> [<c03a49d1>] ? sub_preempt_count+0x9/0x9f
<4> [<c01ba21f>] ? kmem_cache_free+0x85/0xd5
<4> [<c02abae5>] ? acpi_os_release_object+0xd/0x11
<4> [<c02abae5>] ? acpi_os_release_object+0xd/0x11
<4> [<c02abae5>] ? acpi_os_release_object+0xd/0x11
<4> [<c02cb2c3>] ? acpi_ps_free_op+0x51/0x56
<4> [<c02cafd0>] ? acpi_ps_delete_parse_tree+0x38/0x50
<4> [<c012ba43>] __cond_resched+0x17/0x23
<4> [<c03a0e2e>] _cond_resched+0x20/0x2b
<4> [<c02ca71c>] acpi_ps_complete_op+0x214/0x223
<4> [<c02b8ab9>] ? acpi_ds_load2_end_op+0x1b3/0x3f6
<4> [<c02cad98>] acpi_ps_parse_loop+0x66d/0x7bd
<4> [<c02ca089>] acpi_ps_parse_aml+0xd4/0x324
<4> [<c02c909a>] acpi_ns_one_complete_parse+0x10e/0x124
<4> [<c02c911b>] acpi_ns_parse_table+0x6b/0x78
<4> [<c02c5f57>] acpi_ns_load_table+0x63/0xe0
<4> [<c02ccea6>] acpi_load_tables+0x6b/0x13e
<4> [<c05606d1>] acpi_early_init+0x5d/0xeb
<4> [<c054180c>] start_kernel+0x2ce/0x2dd
<4> [<c0541091>] __init_begin+0x91/0x96
<6>ftrace: converting mcount calls to 0f 1f 44 00 00
<6>ftrace: allocating 14224 entries in 28 pages
<6>..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
<6>CPU0: Intel(R) Atom(TM) CPU N270   @ 1.60GHz stepping 02
<6>Booting processor 1 APIC 0x1 ip 0x6000
<6>Initializing CPU#1
.....

<3>BUG: using smp_processor_id() in preemptible [00000000] code: events/0/9
<4>caller is vmstat_update+0x14/0x3e
<4>Pid: 9, comm: events/0 Not tainted 2.6.31-git #3
<4>Call Trace:
<4> [<c039ff98>] ? printk+0x14/0x1c
<4> [<c0284e7a>] debug_smp_processor_id+0x9e/0xb4
<4> [<c01a4749>] vmstat_update+0x14/0x3e
<4> [<c0144a30>] worker_thread+0x15f/0x1e8
<4> [<c01a4735>] ? vmstat_update+0x0/0x3e
<4> [<c014809f>] ? autoremove_wake_function+0x0/0x38
<4> [<c01448d1>] ? worker_thread+0x0/0x1e8
<4> [<c0147d9e>] kthread+0x66/0x6b
<4> [<c0147d38>] ? kthread+0x0/0x6b
<4> [<c01035cf>] kernel_thread_helper+0x7/0x10
<3>BUG: using smp_processor_id() in preemptible [00000000] code: events/0/9
<4>caller is vmstat_update+0x2a/0x3e
<4>Pid: 9, comm: events/0 Not tainted 2.6.31-git #3
<4>Call Trace:
<4> [<c039ff98>] ? printk+0x14/0x1c
<4> [<c0284e7a>] debug_smp_processor_id+0x9e/0xb4
<4> [<c01a475f>] vmstat_update+0x2a/0x3e
<4> [<c0144a30>] worker_thread+0x15f/0x1e8
<4> [<c01a4735>] ? vmstat_update+0x0/0x3e
<4> [<c014809f>] ? autoremove_wake_function+0x0/0x38
<4> [<c01448d1>] ? worker_thread+0x0/0x1e8
<4> [<c0147d9e>] kthread+0x66/0x6b
<4> [<c0147d38>] ? kthread+0x0/0x6b
<4> [<c01035cf>] kernel_thread_helper+0x7/0x10

kbpm

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

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

Thread overview: 13+ 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
  -- strict thread matches above, loose matches on Subject: below --
2009-09-20 11:54 BUG: scheduling while atomic: Kelly Bowa
2009-09-20 12:35 ` Kelly Bowa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.