LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General > LinuxQuestions.org Member Intro
User Name
Password
LinuxQuestions.org Member Intro New to LinuxQuestions.org? Been a long time member but never made a post? Introduce yourself here.

Notices

Reply
 
Search this Thread
Old 06-11-2009, 08:12 AM   #1
remyasj
LQ Newbie
 
Registered: Jun 2009
Posts: 1

Rep: Reputation: 0
control is not going to interrupt handler when interrupt hits


Hi all,

Please help me to solve the issue in interrupt handler module for linux.

I am able to register the IRQ successfully. But my interrupt handler is not responding properly when I get a hardware interrupt.

Interrupt Status registers are responding properly when external interrupt occurs. But the following message"LOS interrupt has been occured " is not displaying in the kernel prompt.


Please have a look at the following code :

static int irq_handler(int irq, void *dev_id)
{

printk("LOS interrupt has been occured\n");
return IRQ_HANDLED;
}




static int __init ofalc_init(void)
{

free_irq(0x14,NULL);
retval= request_irq(0x14,irq_handler,SA_SAMPLE_RANDOM,"ofalc",NULL);
if(retval)
{
if(retval == -EINVAL)
{
printk("invalid IRQ\n");
}
else if(retval == -EBUSY){
printk("IRQ already assigned\n");
}




}
else{
printk("ret_value = %u : IRQ request has been succeeded\n",retval);
}
return 0;
}



Regards
Remya

Last edited by remyasj; 06-11-2009 at 08:24 AM. Reason: to change title
 
Old 11-12-2009, 12:56 AM   #2
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,619
Blog Entries: 29

Rep: Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896
First of all you should not post such questions in introduction forums. It would have been better if you would have posted it here http://www.linuxquestions.org/questi...nux-kernel-70/

Anyways, can you tell me for which device you are writing the interrupt handler?
I am asking you this question coz i've already written an interrupt handler for the "keyboard" and the "serial port". You can refer to the code in this link. You'll get a general idea where you are going wrong.

Kindly read the 3rd post of the following thread:

http://www.linuxquestions.org/questi...5/#post3733767

Last edited by TheIndependentAquarius; 04-20-2012 at 12:47 AM. Reason: corrected u
 
  


Reply


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
Where interrupt handler should be written? Felicia23 Linux - Kernel 2 02-03-2009 01:16 AM
control is not going to interrupt handler when interrupt comes in serial driver sateeshalla Linux - Kernel 1 05-04-2006 09:43 AM
Linux Interrupt Handler lucky6969b Linux - Software 1 12-01-2005 11:55 AM
printk in the interrupt handler lordofring Programming 3 08-23-2005 08:00 PM
<0>Kernel panic: Aiee, killing interrupt handler! In interrupt handler - not syncing mrb Linux - Newbie 2 01-09-2005 09:47 AM


All times are GMT -5. The time now is 05:04 AM.

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