Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
18 years ago

schedule problem

hi all,

i write a kernel module, when i insmod it,

the following is output:

bad: scheduling while atomic!

Stack from 081dff8c:<0>

<0> ffffe000<0> 08189464<0> 081b0e94<0> 02625a00<0> 00000000<0> 00000000<0> 00000000<0> 00000000<0>

<0> 00000000<0> 00000000<0> 00000000<0> 00000000<0> 08fc0428<0> 00000000<0> 00000001<0> 00000002<0>

<0> 08fc04d8<0> ffffe000<0> 00000000<0> 0800305c<0> 0800307c<0> 080001a0<0> 081fc4e0<0> 081e0790<0>

<0> 081e0298<0> 081f45bc<0> 08800000<0> 08006860<0> 08000100<0>

Call Trace:<0>

where it may be wrong? and how can i trace the kernel routine?

in x86 platform, i can use kgdb to debug it, now in nios2, how should i do?

thanks for your help.

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    It may be out of memory,or corrupted.

    How do you build the module? What is your build enviroment ? Did you strip out unnecessary?

    You may use printk() to debug.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    thanks for your care,

    my build enviroment is correct, in nios2 sdk enviroment. but i don&#39;t know where i put the printk(), these messages is out of schedule(), i don&#39;t know which task cause this happen, so i need trace the routine, like kgdb does.

    can you help me?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    You may try a simple hello module first to verify your build enviroment.

    But I would perfer Linux enviroment to build uClinux.