public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] RE: [ACPI] acpi_irq_to_vector()
@ 2003-06-23  6:02 Yu, Luming
  2003-06-23  6:15 ` Yu, Luming
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Yu, Luming @ 2003-06-23  6:02 UTC (permalink / raw)
  To: linux-ia64

>For PCI devices, we just read the irq out of the struct pci_dev.
>The platform code gets the opportunity to mangle the irq in whatever
>way it chooses before the pci_dev is passed to the driver.  Can we do
>something similar for ACPI instead?

The acpi_irq_to_vector is called in acpi_os_install_interrupt_handler which is in acpi_init that is before pci_init get called.
So I don't think it is reasonable to use pci_dev in acpi_init. 


-- 
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk


-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Acpi-devel mailing list
Acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acpi-devel

_______________________________________________
Linux-IA64 mailing list
Linux-IA64@linuxia64.org
http://lists.linuxia64.org/lists/listinfo/linux-ia64

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

* [Linux-ia64] RE: [ACPI] acpi_irq_to_vector()
  2003-06-23  6:02 [Linux-ia64] RE: [ACPI] acpi_irq_to_vector() Yu, Luming
@ 2003-06-23  6:15 ` Yu, Luming
  2003-06-23  7:13 ` Grant Grundler
  2003-06-23 18:47 ` David Mosberger
  2 siblings, 0 replies; 4+ messages in thread
From: Yu, Luming @ 2003-06-23  6:15 UTC (permalink / raw)
  To: linux-ia64

To remove the ugly ifdef in the common part of ACPI code, 
I think the simple way is to define a acpi_irq_to_vector in arch/i386/acpi which only return acpi_fadt.sci_int. 
Or someone can invent a method that can return correct value for each platform.

Thanks,
Luming

-----Original Message-----
From: Matthew Wilcox [mailto:willy@debian.org]
Sent: 2003?6?6? 3:23
To: acpi-devel@lists.sourceforge.net
Subject: [ACPI] acpi_irq_to_vector()



In the 2.5 ia64 patch, there's a lot of places which look like this:

@@ -251,7 +251,14 @@
        irq = acpi_fadt.sci_int;

 #ifdef CONFIG_IA64
-       irq = gsi_to_vector(irq);
+       int vector;
+
+       vector = acpi_irq_to_vector(irq);
+       if (vector < 0) {
+               printk(KERN_ERR PREFIX "SCI (IRQ%d) not registerd\n", irq);
+               return AE_OK;
+       }
+       irq = vector;
 #endif
        acpi_irq_irq = irq;

ok, we renamed gsi_to_vector to acpi_irq_to_vector(); that's fine.
But we still have that ugly ifdef in there.  Any resistance to defining
acpi_irq_to_vector to simply return its value on non-ia64 platforms?

Then it'd look like:

	irq = acpi_fadt.sci_int;
	vector = acpi_irq_to_vector(irq);
	if (vector < 0) {
		printk(KERN_ERR PREFIX "SCI (IRQ%d) not registered\n", irq);
		return AE_OK;
	}
	acpi_irq_irq = vector;
	acpi_irq_handler = handler;
	acpi_irq_context = context;
	if (request_irq(vector, acpi_irq, SA_SHIRQ, "acpi", acpi_irq)) {
...		

-- 
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk


-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
Acpi-devel mailing list
Acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acpi-devel

_______________________________________________
Linux-IA64 mailing list
Linux-IA64@linuxia64.org
http://lists.linuxia64.org/lists/listinfo/linux-ia64

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

* Re: [Linux-ia64] RE: [ACPI] acpi_irq_to_vector()
  2003-06-23  6:02 [Linux-ia64] RE: [ACPI] acpi_irq_to_vector() Yu, Luming
  2003-06-23  6:15 ` Yu, Luming
@ 2003-06-23  7:13 ` Grant Grundler
  2003-06-23 18:47 ` David Mosberger
  2 siblings, 0 replies; 4+ messages in thread
From: Grant Grundler @ 2003-06-23  7:13 UTC (permalink / raw)
  To: linux-ia64

On Mon, Jun 23, 2003 at 02:02:08PM +0800, Yu, Luming wrote:
> So I don't think it is reasonable to use pci_dev in acpi_init. 

That's not what willy was proposing.
I understood he was proposing a similar scheme; not to use pci_dev.

grant

_______________________________________________
Linux-IA64 mailing list
Linux-IA64@linuxia64.org
http://lists.linuxia64.org/lists/listinfo/linux-ia64

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

* Re: [Linux-ia64] RE: [ACPI] acpi_irq_to_vector()
  2003-06-23  6:02 [Linux-ia64] RE: [ACPI] acpi_irq_to_vector() Yu, Luming
  2003-06-23  6:15 ` Yu, Luming
  2003-06-23  7:13 ` Grant Grundler
@ 2003-06-23 18:47 ` David Mosberger
  2 siblings, 0 replies; 4+ messages in thread
From: David Mosberger @ 2003-06-23 18:47 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Mon, 23 Jun 2003 14:15:07 +0800, "Yu, Luming" <luming.yu@intel.com> said:

  Linux> To remove the ugly ifdef in the common part of ACPI code, I
  Linux> think the simple way is to define a acpi_irq_to_vector in
  Linux> arch/i386/acpi which only return acpi_fadt.sci_int.  Or
  Linux> someone can invent a method that can return correct value for
  Linux> each platform.

Shouldn't this be called acpi_gsi_to_irq(), though?

	--david

_______________________________________________
Linux-IA64 mailing list
Linux-IA64@linuxia64.org
http://lists.linuxia64.org/lists/listinfo/linux-ia64

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

end of thread, other threads:[~2003-06-23 18:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-23  6:02 [Linux-ia64] RE: [ACPI] acpi_irq_to_vector() Yu, Luming
2003-06-23  6:15 ` Yu, Luming
2003-06-23  7:13 ` Grant Grundler
2003-06-23 18:47 ` David Mosberger

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