Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 07-09-2014, 01:25 AM   #1
LQ Newbie
Registered: Mar 2011
Posts: 1

Rep: Reputation: 0
Is Interrupt Nesting enabled by default ?

Using kernel 2.6.22. Running IMX.31 arm 11 processor. Compiler and debugger supplied by Freescale.
Sometime a call to a libMath function, like sin() calculation returns with unpredictable values, causing my task to crash.
I have managed to isolate the problem to a use of timer. A timer driver I have wrote, using the IMX.31 timers. If I do no use the timer, no unpredictable values.
I have attached my timer ISR handling. It looks OK to me: Disabling the interrupt, waking a task, enabling the interrupt back and leave.
I use only variables on my stack. Local variables.

1. I will be most thankfull if someone will see something I have missed.
2. Does the linux kernel has interrupt nesting enebled by default? If yes, how can I disable it? This can explain some of the problems I see. I thought interrupt nesting is something that you have to spacially enable.
3. If I want to get the task context, in which the interrupt has accured. How can I get it out? Can I do this using /proc file system ?

Thank you,


static int imx31_timer_interrupt(int irq, void *dev_id)
u32 reg;
u32 epitsr;
unsigned long flags;
struct elbit_timer *timer = dev_id;

epitsr = __raw_readl(MXC_EPITSR(timer->base));

/* Disable interrupt */
reg = __raw_readl(MXC_EPITCR(timer->base));
__raw_writel(reg, MXC_EPITCR(timer->base));

/* Clear interrupt */
__raw_writel(EPITSR_OCIF, MXC_EPITSR(timer->base));

/* Flag interrupt arrival */
spin_lock_irqsave(&timer->irqlock, flags);
timer->irq_arrived = 1;
spin_unlock_irqrestore(&timer->irqlock, flags);

/* Wake up process waiting for timer to expire */

/* Enable interrupt */
reg = __raw_readl(MXC_EPITCR(timer->base));
__raw_writel(reg, MXC_EPITCR(timer->base));



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Is TCP/IP enabled by default? AlexBB Linux - Newbie 4 03-23-2014 08:56 PM
Why is CONFIG_MAGIC_SYSRQ enabled by default hubx Slackware 2 03-01-2011 07:04 AM
Which repos are enabled by default in FC...? Alexvader Fedora 5 11-26-2009 02:23 PM
Only US wireless channels enabled by default bstrik Linux - Wireless Networking 1 12-18-2008 05:33 PM
Interrupt sharing by default? halfpower *BSD 0 08-11-2005 01:24 PM > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 03:52 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration