LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 06-29-2011, 04:38 AM   #1
2raghu
LQ Newbie
 
Registered: Mar 2010
Posts: 7

Rep: Reputation: 0
PCIe Interrupt handling


Hello Experts,

I'm writing driver for pcie xilinx fpga. The fpga hardware team has not given me any interrupt status register, interrupt enable register. They just said to set the bit 9 in the device control register which would enable the interrupt(for read or write completion). Is this sufficient to handle the interrupts? When I register the interrupt with a shared flag, my handler gets called even when the bit 9 is reset, how do i make sure if the appropriate interrupt is being received? How do i control it? Do i need to request the fpga hardware to add any extra registers?

please help.

Thanks a ton.
 
Old 06-29-2011, 10:21 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
Quote:
Originally Posted by 2raghu View Post
Hello Experts,

I'm writing driver for pcie xilinx fpga. The fpga hardware team has not given me any interrupt status register, interrupt enable register. They just said to set the bit 9 in the device control register which would enable the interrupt(for read or write completion). Is this sufficient to handle the interrupts? When I register the interrupt with a shared flag, my handler gets called even when the bit 9 is reset, how do i make sure if the appropriate interrupt is being received? How do i control it? Do i need to request the fpga hardware to add any extra registers?

please help.

Thanks a ton.
The interrupt needs to come up in a disabled state and be enabled by your driver. Otherwise it could trigger before your driver is loaded. If you want to be able to unload your driver, then you also need a way to disable the interrupt before you do.
 
Old 06-30-2011, 12:15 AM   #3
2raghu
LQ Newbie
 
Registered: Mar 2010
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks for the reply. But does this answer my queries?

Appreciate your help.

Thanks.
 
Old 06-30-2011, 09:30 AM   #4
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
Quote:
Originally Posted by 2raghu View Post
Thanks for the reply. But does this answer my queries?
Maybe not.

You only need status if there is not some other way to tell if the chip interrupted - like a memory buffer being written, for example. You don't give much detail about operation.

If interrupts are chained, then you need some way to tell if the int is for you.
You also need a way to clear it if responding twice to one interrupt is a problem.
 
  


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
PCIe run away interrupt (INTx emulation mode) andrewmessier Linux - Hardware 0 04-30-2009 09:33 PM
interrupt handling... culin Programming 2 02-12-2007 11:35 PM
Interrupt handling in C vkmgeek Programming 4 02-28-2006 01:42 AM
interrupt handling mp4-10 Programming 5 02-14-2005 06:13 AM
Interrupt handling in gcc? captainstorm Programming 13 07-16-2003 05:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 12:19 AM.

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