Commit 28505ef9 authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by David Mosberger

[PATCH] ia64: clean up ACPI GSI/IRQ conversions (ia64 part)

Add "acpi_gsi_to_irq()" as a generic replacement for "acpi_irq_to_vector()".
This converts from an ACPI global system interrupt number to a Linux IRQ.
Also, convert ia64-specific terminology to use GSI when appropriate.
parent e13c6d36
...@@ -626,6 +626,7 @@ acpi_boot_init (void) ...@@ -626,6 +626,7 @@ acpi_boot_init (void)
return 0; return 0;
} }
/* deprecated in favor of acpi_gsi_to_irq */
int int
acpi_irq_to_vector (u32 gsi) acpi_irq_to_vector (u32 gsi)
{ {
...@@ -635,6 +636,23 @@ acpi_irq_to_vector (u32 gsi) ...@@ -635,6 +636,23 @@ acpi_irq_to_vector (u32 gsi)
return gsi_to_vector(gsi); return gsi_to_vector(gsi);
} }
int
acpi_gsi_to_irq (u32 gsi, unsigned int *irq)
{
int vector;
if (has_8259 && gsi < 16)
*irq = isa_irq_to_vector(gsi);
else {
vector = gsi_to_vector(gsi);
if (vector == -1)
return -1;
*irq = vector;
}
return 0;
}
int int
acpi_register_irq (u32 gsi, u32 polarity, u32 trigger) acpi_register_irq (u32 gsi, u32 polarity, u32 trigger)
{ {
......
...@@ -93,7 +93,8 @@ ia64_acpi_release_global_lock (unsigned int *lock) ...@@ -93,7 +93,8 @@ ia64_acpi_release_global_lock (unsigned int *lock)
const char *acpi_get_sysname (void); const char *acpi_get_sysname (void);
int acpi_request_vector (u32 int_type); int acpi_request_vector (u32 int_type);
int acpi_register_irq (u32 gsi, u32 polarity, u32 trigger); int acpi_register_irq (u32 gsi, u32 polarity, u32 trigger);
int acpi_irq_to_vector (u32 irq); int acpi_irq_to_vector (u32 irq); /* deprecated in favor of acpi_gsi_to_irq */
int acpi_gsi_to_irq (u32 gsi, unsigned int *irq);
#ifdef CONFIG_ACPI_NUMA #ifdef CONFIG_ACPI_NUMA
/* Proximity bitmap length; _PXM is at most 255 (8 bit)*/ /* Proximity bitmap length; _PXM is at most 255 (8 bit)*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment