LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-25-2010, 03:01 PM   #1
agaurav
LQ Newbie
 
Registered: Jan 2010
Posts: 1

Rep: Reputation: 0
Device driver: Badness in irq_manage


Dear All,

I am a newbie to Linux. I am writing a device driver for a customer chip that will be controller by a host CPU running Linux. The hardware generates interrupts that I am trying to handle in software. I wrote a simplistic interrupt handler and it seems to work just fine but the kernel device driver does report errors on the console which bothers me. Any advise what may be the root cause or how I can debug this?

The error reported is as follows for the code given below. Any
pointers really appreciated. Thanks.

Gaurav

Code:
request succeeded for 30
Badness in enable_irq at kernel/irq/manage.c:106
Call trace:
 [c0005520] dump_stack+0x18/0x28
 [c00036f0] check_bug_trap+0x80/0xa4
 [c00037c4] ProgramCheckException+0xb0/0xe0
 [c0002df8] ret_from_except_full+0x0/0x4c
 [c00332c8] enable_irq+0xa0/0xa8
 [c9004928] ebc_open+0x1f8/0x3fc [ebc]
 [c005f34c] chrdev_open+0xf0/0x184
 [c0054204] dentry_open+0x164/0x26c
 [c005409c] filp_open+0x68/0x6c
 [c005458c] sys_open+0x68/0xa4
 [c0002780] ret_from_syscall+0x0/0x48
enable irq done

This happens in the following code fragment:

Code:
int my_open (struct inode *inode, struct file *filp){

....
....
	  /* register interrupt */
	  result = request_irq (MY_IRQ_NUM,my_irq_handler,SA_INTERRUPT,"me",NULL);
	  if (result){
		PRINTK(1, "my interrupt can't be assigned\n");
		my_release (inode,filp);
		return (-1);
	  }
          printk("request succeeded for %d\n", MY_IRQ_NUM);
	  /* enable vync interrupt */
	  enable_irq(VSYNC_IRQ_NUM); <--- problem happens here
          printk("enable irq done\n");
....
....
 
  


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
Mtd driver as block device and char device Linux_Kid_ Linux - Kernel 1 12-27-2009 12:17 PM
Question about usb storage device and device driver balteo Linux - Hardware 2 11-21-2009 09:37 AM
Multiple Device driver from single device driver???? rickhg12hs Linux - Kernel 3 05-25-2008 12:11 AM
Badness in enable_irq ksrinivas Linux - Newbie 2 04-16-2007 09:53 PM
Badness in __put_task_struct at kernel/fork.c:87 abefroman Fedora - Installation 2 12-07-2004 04:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:03 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration