ACPI: pci_link: remove acpi_irq_balance_set() interface

This removes the acpi_irq_balance_set() interface from the PCI
interrupt link driver.

x86 used acpi_irq_balance_set() to tell the PCI interrupt link
driver to configure links to minimize IRQ sharing.  But the link
driver can easily figure out whether to turn on IRQ balancing
based on the IRQ model (PIC/IOAPIC/etc), so we can get rid of
that external interface.

It's better for the driver to figure this out at init-time.  If
we set it externally via the x86 code, the interface reduces
modularity, and we depend on the fact that acpi_process_madt()
happens before we process the kernel command line.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
Bjorn Helgaas 2008-11-05 16:17:52 -07:00 committed by Len Brown
parent 56960b546a
commit 32836259ff
3 changed files with 9 additions and 4 deletions

View file

@ -113,7 +113,6 @@ static inline void acpi_disable_pci(void)
acpi_pci_disabled = 1;
acpi_noirq_set();
}
extern int acpi_irq_balance_set(char *str);
/* routines for saving/restoring kernel state */
extern int acpi_save_state_mem(void);

View file

@ -1343,7 +1343,6 @@ static void __init acpi_process_madt(void)
error = acpi_parse_madt_ioapic_entries();
if (!error) {
acpi_irq_model = ACPI_IRQ_MODEL_IOAPIC;
acpi_irq_balance_set(NULL);
acpi_ioapic = 1;
smp_found_config = 1;

View file

@ -531,7 +531,7 @@ int __init acpi_irq_penalty_init(void)
return 0;
}
static int acpi_irq_balance; /* 0: static, 1: balance */
static int acpi_irq_balance = -1; /* 0: static, 1: balance */
static int acpi_pci_link_allocate(struct acpi_pci_link *link)
{
@ -950,10 +950,17 @@ device_initcall(irqrouter_init_sysfs);
static int __init acpi_pci_link_init(void)
{
if (acpi_noirq)
return 0;
if (acpi_irq_balance == -1) {
/* no command line switch: enable balancing in IOAPIC mode */
if (acpi_irq_model == ACPI_IRQ_MODEL_IOAPIC)
acpi_irq_balance = 1;
else
acpi_irq_balance = 0;
}
acpi_link.count = 0;
INIT_LIST_HEAD(&acpi_link.entries);