public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* request_irq() and setup_irq()
@ 2004-10-21 15:11 Christian Hildner
  2004-10-21 15:38 ` Matthew Wilcox
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Christian Hildner @ 2004-10-21 15:11 UTC (permalink / raw)
  To: linux-ia64

Hi,

looking through the sources of 2.4.21 there come up one question. If a 
device wants to register its interrupt it may call request_irq() that 
then calls setup_irq(). Now since SA_PERCPU_IRQ is not set by the device 
setup_irq() does not initialize desc->handler. Can that be fixed by 
adding SA_PERCPU_IRQ to irqflags in request_irq() or does that introduce 
problems at another place?

Christian


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

* Re: request_irq() and setup_irq()
  2004-10-21 15:11 request_irq() and setup_irq() Christian Hildner
@ 2004-10-21 15:38 ` Matthew Wilcox
  2004-10-21 16:53 ` Grant Grundler
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Matthew Wilcox @ 2004-10-21 15:38 UTC (permalink / raw)
  To: linux-ia64

On Thu, Oct 21, 2004 at 05:11:32PM +0200, Christian Hildner wrote:
> Hi,
> 
> looking through the sources of 2.4.21 there come up one question. If a 

... why on earth are you looking at 2.4.21?

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain

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

* Re: request_irq() and setup_irq()
  2004-10-21 15:11 request_irq() and setup_irq() Christian Hildner
  2004-10-21 15:38 ` Matthew Wilcox
@ 2004-10-21 16:53 ` Grant Grundler
  2004-10-22  1:22 ` Tian, Kevin
  2004-10-22 13:06 ` Christian Hildner
  3 siblings, 0 replies; 5+ messages in thread
From: Grant Grundler @ 2004-10-21 16:53 UTC (permalink / raw)
  To: linux-ia64

On Thu, Oct 21, 2004 at 05:11:32PM +0200, Christian Hildner wrote:
> Hi,
> 
> looking through the sources of 2.4.21 there come up one question. If a 
> device wants to register its interrupt it may call request_irq() that 
> then calls setup_irq(). Now since SA_PERCPU_IRQ is not set by the device 
> setup_irq() does not initialize desc->handler.

Sorry - can you explain why this is a problem?
Are you trying to avoid the spinlock in do_IRQ() or something else?

It's been a while since I've last played with 2.4.21, but it mostly
worked for the things I was testing at the time.

> Can that be fixed by 
> adding SA_PERCPU_IRQ to irqflags in request_irq() or does that introduce 
> problems at another place?

For IO SAPIC generated interrupts, that should work fine on platforms
that don't implement XPR (IIRC, e.g. HP ZX1). Systems which implement
XPR could redirect the interrupt to a different CPU (e.g Intel).
IIRC, one can "pin" the IO SAPIC generated interrupt to a CPU despite
XPR but I don't recall details or if that's already being done.
You'll need to investigate this a bit more.

hth,
grant

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

* RE: request_irq() and setup_irq()
  2004-10-21 15:11 request_irq() and setup_irq() Christian Hildner
  2004-10-21 15:38 ` Matthew Wilcox
  2004-10-21 16:53 ` Grant Grundler
@ 2004-10-22  1:22 ` Tian, Kevin
  2004-10-22 13:06 ` Christian Hildner
  3 siblings, 0 replies; 5+ messages in thread
From: Tian, Kevin @ 2004-10-22  1:22 UTC (permalink / raw)
  To: linux-ia64

>-----Original Message-----
>From: linux-ia64-owner@vger.kernel.org
[mailto:linux-ia64-owner@vger.kernel.org]
>On Behalf Of Christian Hildner
>Sent: Thursday, October 21, 2004 11:12 PM
>Hi,
>
>looking through the sources of 2.4.21 there come up one question. If a
>device wants to register its interrupt it may call request_irq() that
>then calls setup_irq(). Now since SA_PERCPU_IRQ is not set by the
device
>setup_irq() does not initialize desc->handler. Can that be fixed by
>adding SA_PERCPU_IRQ to irqflags in request_irq() or does that
introduce
>problems at another place?
>
>Christian

ACPI can provide MADT table for lsapic and iosapic info in local system.
From that table, linux will configure interrupt controller info for each
interrupt line when bootup. You can look at iosapic_init(), which
constructs per-line info related to iosapic. Say, by trigger mode of
specific line, register_intr() will decide whether irq_type_iosapic_edge
or irq_type_iosapic_level should be used. 

Thanks,
Kevin

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

* Re: request_irq() and setup_irq()
  2004-10-21 15:11 request_irq() and setup_irq() Christian Hildner
                   ` (2 preceding siblings ...)
  2004-10-22  1:22 ` Tian, Kevin
@ 2004-10-22 13:06 ` Christian Hildner
  3 siblings, 0 replies; 5+ messages in thread
From: Christian Hildner @ 2004-10-22 13:06 UTC (permalink / raw)
  To: linux-ia64

Tian, Kevin schrieb:

>
>ACPI can provide MADT table for lsapic and iosapic info in local system.
From that table, linux will configure interrupt controller info for each
>interrupt line when bootup. You can look at iosapic_init(), which
>constructs per-line info related to iosapic. Say, by trigger mode of
>specific line, register_intr() will decide whether irq_type_iosapic_edge
>or irq_type_iosapic_level should be used. 
>
Kevin,
thanks for your good pointers. Indeed iosapic_init() and register_intr() 
are the choice since they install a handler as needed. But before I had 
to walk through the hell of acpi.

Thanks a lot

Christian


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

end of thread, other threads:[~2004-10-22 13:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-21 15:11 request_irq() and setup_irq() Christian Hildner
2004-10-21 15:38 ` Matthew Wilcox
2004-10-21 16:53 ` Grant Grundler
2004-10-22  1:22 ` Tian, Kevin
2004-10-22 13:06 ` Christian Hildner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox