LinuxQuestions.org
Help answer threads with 0 replies.
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 04-17-2013, 06:39 AM   #1
Maz_
LQ Newbie
 
Registered: May 2006
Location: Finland
Distribution: fedora
Posts: 15

Rep: Reputation: 0
What happens to new MSI interrupts occurring while previous is being handled


Hello!

I am working with an asic that is controlled by CPU. With our current board this asic sends interrupts to processor via single interrupt line. CPU sees level active interrupt, and reads the reason(s) from asic's register. When handler(s) have executed, the read interrupts are acked to asic, and if no more interrupt(s) have ocurred on asic, this interrupt line is brought in inactive state. If new (different type of) interrupts have occurred on asic, the acking wont clean all interrupts from asic's register and asic keeps the interrupt line activated. Thus CPU is interrupted again && this process is done again && all interrupts are handled.

Now there is plans to make this asic to use PCIe, and MSI interrupts. Also we hope to utilize the same driver(s) for this asic. So first idea would be to implement this as:
1. asic generates irq
2. MSI interrupt is sent (to PCIe controller) and CPU is interrupted
3. CPU acks interrupt to PCIe controller.
4. isr reads the interrupt reason(s) from asic and handles interrupt(s)
5. isr acks the interrupts.
So is there a problem if new interrupt is generated between steps 4 and 5. Do we lose this new interrupt because the isr is still running? So when the isr acks interrupts to asic, it does not ack this new one because it had not happened when the reasons were read at step 4?

I have read the MSI-HOWTO.txt and genirq guides, and even tried to read some sources. However I have not found out solid answer. Is there some de-facto method to do this so it works reliably?

Following section may contain errors, it is what I have guessed by reading the sources - please kick me if it sounds stupid.

By reading the sources I have figured that the "interrupt-controller" for MSI interrupts on processor does used handle_simple_irq as flow handler. If I am correct, this does not "queue" interrupts in same fashion the handle_edge_irq would do.

Does this mean that my fear is correct?
 
Old 04-17-2013, 08:57 AM   #2
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,366

Rep: Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106
Probably the right way to go about this is to first read the interrupts, then reset the chip (with interrupts disabled on the CPU), then handle the interrupt.
 
  


Reply

Tags
interrupt, interrupt handlers, interrupts, msi


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
"Enabling the pci based MSI interrupts." haribabu1836 Linux - Software 1 04-05-2010 08:59 AM
[SOLVED] Need to concatenate many files with the same name occurring in many subdirectories kmkocot Linux - Newbie 11 12-15-2009 07:21 PM
Can anyone please explain about "Function call interrupts" entry in /proc/interrupts? cyclops.xmen Linux - Software 2 12-09-2009 12:13 PM
Two Error Messages Occurring Every Five Minutes kaplan71 Red Hat 2 01-06-2009 08:10 PM
How do I detect where network problems are occurring? MikeyCarter Linux - Software 5 12-04-2008 01:58 PM


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