summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/pci_irq.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2005-09-30 19:03:00 -0400
committerLen Brown <len.brown@intel.com>2005-12-10 00:20:25 -0500
commit50eca3eb89d73d9f0aa070b126c7ee6a616016ab (patch)
treeb2d06d21b34b9bd17eea4c53cff1f3866fa1b21d /drivers/acpi/pci_irq.c
parent3d5271f9883cba7b54762bc4fe027d4172f06db7 (diff)
downloadop-kernel-dev-50eca3eb89d73d9f0aa070b126c7ee6a616016ab.zip
op-kernel-dev-50eca3eb89d73d9f0aa070b126c7ee6a616016ab.tar.gz
[ACPI] ACPICA 20050930
Completed a major overhaul of the Resource Manager code - specifically, optimizations in the area of the AML/internal resource conversion code. The code has been optimized to simplify and eliminate duplicated code, CPU stack use has been decreased by optimizing function parameters and local variables, and naming conventions across the manager have been standardized for clarity and ease of maintenance (this includes function, parameter, variable, and struct/typedef names.) All Resource Manager dispatch and information tables have been moved to a single location for clarity and ease of maintenance. One new file was created, named "rsinfo.c". The ACPI return macros (return_ACPI_STATUS, etc.) have been modified to guarantee that the argument is not evaluated twice, making them less prone to macro side-effects. However, since there exists the possibility of additional stack use if a particular compiler cannot optimize them (such as in the debug generation case), the original macros are optionally available. Note that some invocations of the return_VALUE macro may now cause size mismatch warnings; the return_UINT8 and return_UINT32 macros are provided to eliminate these. (From Randy Dunlap) Implemented a new mechanism to enable debug tracing for individual control methods. A new external interface, acpi_debug_trace(), is provided to enable this mechanism. The intent is to allow the host OS to easily enable and disable tracing for problematic control methods. This interface can be easily exposed to a user or debugger interface if desired. See the file psxface.c for details. acpi_ut_callocate() will now return a valid pointer if a length of zero is specified - a length of one is used and a warning is issued. This matches the behavior of acpi_ut_allocate(). Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/pci_irq.c')
-rw-r--r--drivers/acpi/pci_irq.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
index 09567c2..726dda1 100644
--- a/drivers/acpi/pci_irq.c
+++ b/drivers/acpi/pci_irq.c
@@ -258,7 +258,7 @@ typedef int (*irq_lookup_func) (struct acpi_prt_entry *, int *, int *, char **);
static int
acpi_pci_allocate_irq(struct acpi_prt_entry *entry,
- int *edge_level, int *active_high_low, char **link)
+ int *triggering, int *polarity, char **link)
{
int irq;
@@ -266,8 +266,8 @@ acpi_pci_allocate_irq(struct acpi_prt_entry *entry,
if (entry->link.handle) {
irq = acpi_pci_link_allocate_irq(entry->link.handle,
- entry->link.index, edge_level,
- active_high_low, link);
+ entry->link.index, triggering,
+ polarity, link);
if (irq < 0) {
ACPI_DEBUG_PRINT((ACPI_DB_WARN,
"Invalid IRQ link routing entry\n"));
@@ -275,8 +275,8 @@ acpi_pci_allocate_irq(struct acpi_prt_entry *entry,
}
} else {
irq = entry->link.index;
- *edge_level = ACPI_LEVEL_SENSITIVE;
- *active_high_low = ACPI_ACTIVE_LOW;
+ *triggering = ACPI_LEVEL_SENSITIVE;
+ *polarity = ACPI_ACTIVE_LOW;
}
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found IRQ %d\n", irq));
@@ -285,7 +285,7 @@ acpi_pci_allocate_irq(struct acpi_prt_entry *entry,
static int
acpi_pci_free_irq(struct acpi_prt_entry *entry,
- int *edge_level, int *active_high_low, char **link)
+ int *triggering, int *polarity, char **link)
{
int irq;
@@ -307,8 +307,8 @@ static int
acpi_pci_irq_lookup(struct pci_bus *bus,
int device,
int pin,
- int *edge_level,
- int *active_high_low, char **link, irq_lookup_func func)
+ int *triggering,
+ int *polarity, char **link, irq_lookup_func func)
{
struct acpi_prt_entry *entry = NULL;
int segment = pci_domain_nr(bus);
@@ -327,7 +327,7 @@ acpi_pci_irq_lookup(struct pci_bus *bus,
return_VALUE(-1);
}
- ret = func(entry, edge_level, active_high_low, link);
+ ret = func(entry, triggering, polarity, link);
return_VALUE(ret);
}
@@ -339,8 +339,8 @@ acpi_pci_irq_lookup(struct pci_bus *bus,
static int
acpi_pci_irq_derive(struct pci_dev *dev,
int pin,
- int *edge_level,
- int *active_high_low, char **link, irq_lookup_func func)
+ int *triggering,
+ int *polarity, char **link, irq_lookup_func func)
{
struct pci_dev *bridge = dev;
int irq = -1;
@@ -375,7 +375,7 @@ acpi_pci_irq_derive(struct pci_dev *dev,
}
irq = acpi_pci_irq_lookup(bridge->bus, PCI_SLOT(bridge->devfn),
- pin, edge_level, active_high_low,
+ pin, triggering, polarity,
link, func);
}
@@ -402,8 +402,8 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
{
int irq = 0;
u8 pin = 0;
- int edge_level = ACPI_LEVEL_SENSITIVE;
- int active_high_low = ACPI_ACTIVE_LOW;
+ int triggering = ACPI_LEVEL_SENSITIVE;
+ int polarity = ACPI_ACTIVE_LOW;
char *link = NULL;
int rc;
@@ -432,7 +432,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
* values override any BIOS-assigned IRQs set during boot.
*/
irq = acpi_pci_irq_lookup(dev->bus, PCI_SLOT(dev->devfn), pin,
- &edge_level, &active_high_low, &link,
+ &triggering, &polarity, &link,
acpi_pci_allocate_irq);
/*
@@ -440,8 +440,8 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
* device's parent bridge.
*/
if (irq < 0)
- irq = acpi_pci_irq_derive(dev, pin, &edge_level,
- &active_high_low, &link,
+ irq = acpi_pci_irq_derive(dev, pin, &triggering,
+ &polarity, &link,
acpi_pci_allocate_irq);
/*
@@ -463,7 +463,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
}
}
- rc = acpi_register_gsi(irq, edge_level, active_high_low);
+ rc = acpi_register_gsi(irq, triggering, polarity);
if (rc < 0) {
printk(KERN_WARNING PREFIX "PCI Interrupt %s[%c]: failed "
"to register GSI\n", pci_name(dev), ('A' + pin));
@@ -478,8 +478,8 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
printk("Link [%s] -> ", link);
printk("GSI %u (%s, %s) -> IRQ %d\n", irq,
- (edge_level == ACPI_LEVEL_SENSITIVE) ? "level" : "edge",
- (active_high_low == ACPI_ACTIVE_LOW) ? "low" : "high", dev->irq);
+ (triggering == ACPI_LEVEL_SENSITIVE) ? "level" : "edge",
+ (polarity == ACPI_ACTIVE_LOW) ? "low" : "high", dev->irq);
return_VALUE(0);
}
@@ -495,8 +495,8 @@ void acpi_pci_irq_disable(struct pci_dev *dev)
{
int gsi = 0;
u8 pin = 0;
- int edge_level = ACPI_LEVEL_SENSITIVE;
- int active_high_low = ACPI_ACTIVE_LOW;
+ int triggering = ACPI_LEVEL_SENSITIVE;
+ int polarity = ACPI_ACTIVE_LOW;
ACPI_FUNCTION_TRACE("acpi_pci_irq_disable");
@@ -512,7 +512,7 @@ void acpi_pci_irq_disable(struct pci_dev *dev)
* First we check the PCI IRQ routing table (PRT) for an IRQ.
*/
gsi = acpi_pci_irq_lookup(dev->bus, PCI_SLOT(dev->devfn), pin,
- &edge_level, &active_high_low, NULL,
+ &triggering, &polarity, NULL,
acpi_pci_free_irq);
/*
* If no PRT entry was found, we'll try to derive an IRQ from the
@@ -520,7 +520,7 @@ void acpi_pci_irq_disable(struct pci_dev *dev)
*/
if (gsi < 0)
gsi = acpi_pci_irq_derive(dev, pin,
- &edge_level, &active_high_low, NULL,
+ &triggering, &polarity, NULL,
acpi_pci_free_irq);
if (gsi < 0)
return_VOID;
OpenPOWER on IntegriCloud