Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
We are using embedded linux. Recently we have upgraded our kernel from 2.6.29 to 2.6.37.After upgrading the custom driver (provided by infineon for 2.6.29) the functionality is not working, kernel hangs and getting watchdog reboot.
After stopping watchdog also we are not getting any info why / where the hang is happening.
Thanks for your reply. Yes, we have the source code. we have changed the ioctl to unlocked_ioctl.
Now the problem seems to be in interrupt, If the interrupt assignment number is not correct, no hang happen. So we feel that the kernel hangs while getting or processing interrupt.. but we are not getting any clue where and why it's happening.
There's a difference between ioctl and unlocked_ioctl. In the new one, you need to add synchronization yourself. Look if it is not the case of a race condition between the unlocked_ioctl and the interrupt.
I found the route cause for the problem.
The kernel hang due to the following new change in kernel 2.6.37
Request irq() changed with request_threaded_irq with added parameter for the thread ptr.
Bydefault, the kernel isr routine will re-enable the interrupt after processing the user isr routine.
The default behavior of kernel re-enabling interrupt giving problem for our driver and kernel hangs due to multiple interrupts.
For threaded irq, which don’t want to re-enable the interrupt after the isr, we need to pass a parameter IRQF_ONESHOT in request_irq().
After adding the IRQF_ONESHOT in request_irq() our kernel hang issue resolved.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.