linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Interrupt Sharing
@ 2002-09-24 21:19 Mohamed Ghouse , Gurgaon
  2002-09-24 21:25 ` Robert Love
  0 siblings, 1 reply; 5+ messages in thread
From: Mohamed Ghouse , Gurgaon @ 2002-09-24 21:19 UTC (permalink / raw)
  To: Linux-Kernel (E-mail)

Hello All

 Can any one throw some light on how the Interrupt sharing is acheived by
the Linux Operating System for a PCI Compliant device?

Let me Re-Phrase the Question
The PCI Interrupts are shareable. How does the Operating System(Linux)
implement this?

TIA
-MG

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Interrupt Sharing
  2002-09-24 21:19 Interrupt Sharing Mohamed Ghouse , Gurgaon
@ 2002-09-24 21:25 ` Robert Love
  0 siblings, 0 replies; 5+ messages in thread
From: Robert Love @ 2002-09-24 21:25 UTC (permalink / raw)
  To: Mohamed Ghouse , Gurgaon; +Cc: Linux-Kernel (E-mail)

On Tue, 2002-09-24 at 17:19, Mohamed Ghouse , Gurgaon wrote:

> Let me Re-Phrase the Question
> The PCI Interrupts are shareable. How does the Operating System(Linux)
> implement this?

It does not have to do anything special, actually.  If interrupt n comes
in, then each handler registered on interrupt n is run.

The incorrect handlers should check for work to do, see none, and
return.  The correct one will actually run.

	Robert Love


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Interrupt Sharing
  2002-09-24 21:40 Mohamed Ghouse , Gurgaon
  2002-09-25  5:09 ` Zwane Mwaikambo
@ 2002-09-25  8:37 ` Martin Mares
  1 sibling, 0 replies; 5+ messages in thread
From: Martin Mares @ 2002-09-25  8:37 UTC (permalink / raw)
  To: Mohamed Ghouse , Gurgaon; +Cc: Linux-Kernel (E-mail)

Hello!

> But what if two PCI Devices are sharing the same interrupt line?
> Then how does the handler handle this?
> Can you please explain this handling by the Kernel?

All drivers register their interrupt handlers by calling request_irq().
When a shared interrupt arrives, all handlers for this interrupt are
run and each of them polls the status register of the device it handles
to see whether this device needs servicing.

				Have a nice fortnight
-- 
Martin `MJ' Mares   <mj@ucw.cz>   http://atrey.karlin.mff.cuni.cz/~mj/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
Why is it called "common sense" when nobody seems to have any?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Interrupt Sharing
  2002-09-24 21:40 Mohamed Ghouse , Gurgaon
@ 2002-09-25  5:09 ` Zwane Mwaikambo
  2002-09-25  8:37 ` Martin Mares
  1 sibling, 0 replies; 5+ messages in thread
From: Zwane Mwaikambo @ 2002-09-25  5:09 UTC (permalink / raw)
  To: Mohamed Ghouse , Gurgaon; +Cc: Linux-Kernel (E-mail)

On Wed, 25 Sep 2002, Mohamed Ghouse , Gurgaon wrote:

> But what if two PCI Devices are sharing the same interrupt line?
> Then how does the handler handle this?
> Can you please explain this handling by the Kernel?

have a look at arch/i386/kernel/irq.c:request_irq then go down to do_IRQ 
-> handle_IRQ_event. if you want the guts before that, check out 
arch/i386/kernel/entry.S around common_interrupt.

	Zwane


-- 
function.linuxpower.ca


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Interrupt Sharing
@ 2002-09-24 21:40 Mohamed Ghouse , Gurgaon
  2002-09-25  5:09 ` Zwane Mwaikambo
  2002-09-25  8:37 ` Martin Mares
  0 siblings, 2 replies; 5+ messages in thread
From: Mohamed Ghouse , Gurgaon @ 2002-09-24 21:40 UTC (permalink / raw)
  To: Linux-Kernel (E-mail)

But what if two PCI Devices are sharing the same interrupt line?
Then how does the handler handle this?
Can you please explain this handling by the Kernel?

-MG

> -----Original Message-----
> From: Robert Love [mailto:rml@tech9.net]
> Sent: Wednesday, September 25, 2002 2:55 AM
> To: Mohamed "Ghouse , Gurgaon
> Cc: Linux-Kernel (E-mail)
> Subject: Re: Interrupt Sharing
> 
> 
> On Tue, 2002-09-24 at 17:19, Mohamed Ghouse , Gurgaon wrote:
> 
> > Let me Re-Phrase the Question
> > The PCI Interrupts are shareable. How does the Operating 
> System(Linux)
> > implement this?
> 
> It does not have to do anything special, actually.  If 
> interrupt n comes
> in, then each handler registered on interrupt n is run.
> 
> The incorrect handlers should check for work to do, see none, and
> return.  The correct one will actually run.
> 
> 	Robert Love
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-09-25  8:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-24 21:19 Interrupt Sharing Mohamed Ghouse , Gurgaon
2002-09-24 21:25 ` Robert Love
2002-09-24 21:40 Mohamed Ghouse , Gurgaon
2002-09-25  5:09 ` Zwane Mwaikambo
2002-09-25  8:37 ` Martin Mares

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).