Commit 32836259 authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Len Brown

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: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 56960b54
...@@ -113,7 +113,6 @@ static inline void acpi_disable_pci(void) ...@@ -113,7 +113,6 @@ static inline void acpi_disable_pci(void)
acpi_pci_disabled = 1; acpi_pci_disabled = 1;
acpi_noirq_set(); acpi_noirq_set();
} }
extern int acpi_irq_balance_set(char *str);
/* routines for saving/restoring kernel state */ /* routines for saving/restoring kernel state */
extern int acpi_save_state_mem(void); extern int acpi_save_state_mem(void);
......
...@@ -1343,7 +1343,6 @@ static void __init acpi_process_madt(void) ...@@ -1343,7 +1343,6 @@ static void __init acpi_process_madt(void)
error = acpi_parse_madt_ioapic_entries(); error = acpi_parse_madt_ioapic_entries();
if (!error) { if (!error) {
acpi_irq_model = ACPI_IRQ_MODEL_IOAPIC; acpi_irq_model = ACPI_IRQ_MODEL_IOAPIC;
acpi_irq_balance_set(NULL);
acpi_ioapic = 1; acpi_ioapic = 1;
smp_found_config = 1; smp_found_config = 1;
......
...@@ -531,7 +531,7 @@ int __init acpi_irq_penalty_init(void) ...@@ -531,7 +531,7 @@ int __init acpi_irq_penalty_init(void)
return 0; 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) static int acpi_pci_link_allocate(struct acpi_pci_link *link)
{ {
...@@ -950,10 +950,17 @@ device_initcall(irqrouter_init_sysfs); ...@@ -950,10 +950,17 @@ device_initcall(irqrouter_init_sysfs);
static int __init acpi_pci_link_init(void) static int __init acpi_pci_link_init(void)
{ {
if (acpi_noirq) if (acpi_noirq)
return 0; 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; acpi_link.count = 0;
INIT_LIST_HEAD(&acpi_link.entries); INIT_LIST_HEAD(&acpi_link.entries);
......
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