LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-01-2011, 10:09 AM   #1
Vermidias
Member
 
Registered: Dec 2010
Location: GERMANY
Posts: 32

Rep: Reputation: 2
IRQ


Can anyone tell me the difference between setup_irq and request_irq and if there is a difference is there a way to use request_irq instead of setup_irq in this module?

http://lxr.free-electrons.com/source...?v=2.6.28#L214
 
Old 02-01-2011, 10:24 AM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

Q: I assume you're probably getting a compile error (hence the question)?

Q: Have you tried adding "#include <linux/irq.h>"? Would that resolve the problem?

Q: Or is there some other reason you want to use "request_irq()"? If so, it would also be helpful to know your target platform and kernel version.
 
Old 02-02-2011, 03:04 AM   #3
Vermidias
Member
 
Registered: Dec 2010
Location: GERMANY
Posts: 32

Original Poster
Rep: Reputation: 2
Kernel Version 2.6.28
including irq.h doesnt work at all because setup_irq is exported in
Linux/kernel/irq/manage.c
but compiling that gives me a new list of undefined symbols. So i thought using request_irq would be easier. /proc/interrupts tells me that everything is fine but after the time elapsed nothing happen and /proc/stat tells me the same --> Zero interrupts. Thats why i wanted to know if there are any differences between setup_irq and request_irq because thats the only thing i made different. I dont think thats really my problem but geode_mfgpt_set_irq returns 0 so thats ok too.
 
Old 02-02-2011, 03:10 AM   #4
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
Quote:
Originally Posted by Vermidias View Post
Thats why i wanted to know if there are any differences between setup_irq and request_irq
REad this till end: http://book.chinaunix.net/special/eb...-5-SECT-4.html
 
1 members found this post helpful.
Old 02-02-2011, 04:17 AM   #5
Vermidias
Member
 
Registered: Dec 2010
Location: GERMANY
Posts: 32

Original Poster
Rep: Reputation: 2
Unhappy

Quote:
The request_irq function ... is a wrapper around setup_irq ...
If i am not mistaken it means setup_irq is part of request_irq, whitch means using request_irq is ok, whats bad because my mistake must be anywhere else...

Thanks for your help
 
Old 02-02-2011, 04:29 AM   #6
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
Have you checked their parameters? Are they EXACTLY same?
 
Old 02-02-2011, 12:49 PM   #7
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

Q: Did you already resolve the problem? How?

Otherwise...
Quote:
Kernel Version 2.6.28
Good, but it would also be helpful to know the target platform and any (possibly relevant) build options.

Quote:
setup_irq is exported in Linux/kernel/irq/manage.c but compiling that gives me a new list of undefined symbols.
If there's still an issue, then I believe that this is the main problem we need to focus on. Please cut/paste some of the error messages you get.

Last edited by paulsm4; 02-02-2011 at 12:50 PM.
 
Old 02-03-2011, 01:10 PM   #8
Vermidias
Member
 
Registered: Dec 2010
Location: GERMANY
Posts: 32

Original Poster
Rep: Reputation: 2
I found the problem but I didnīt find the solution. It has nothing to do with request_irq that works absolutly fine so this task is solved.

For everyone: request_irq does absolutly the same as setup_irq

With cmp2 everything works fine but I want to use cmp1. the code is ok but it doesnt work. I hope checking what heīs really writing to the register gives me the cloue whats wrong.

Last edited by Vermidias; 02-03-2011 at 02:12 PM.
 
  


Reply



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
UNIQ IRQ and Shared IRQ...I want to make Shared IRQ routin chxooi Linux - Hardware 1 06-12-2010 07:30 AM
Wondering what "do_IRQ: .176 No Irq handler for vector (irq -1)" means 4restg Linux - Newbie 1 10-27-2009 02:41 AM
SCSI Errors when IRQ Shared - How do I not share IRQ MQMan Linux - Hardware 2 01-08-2006 11:42 PM
Irq thep Linux - Hardware 4 02-26-2003 08:01 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:17 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