From: Len Brown <lenb@kernel.org>
To: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: linux-acpi@vger.kernel.org, Zhao Yakui <yakui.zhao@intel.com>,
Alexey Starikovskiy <astarikovskiy@suse.de>
Subject: Re: [PATCH 04/11] ACPI: pci_link: remove acpi_irq_balance_set() interface
Date: Thu, 06 Nov 2008 15:41:23 -0500 (EST) [thread overview]
Message-ID: <alpine.LFD.2.00.0811061541140.3106@localhost.localdomain> (raw)
In-Reply-To: <20081105231752.26131.78523.stgit@bob.kio>
applied to acpi-test
thanks,
-len
On Wed, 5 Nov 2008, Bjorn Helgaas wrote:
> 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>
> ---
> arch/x86/include/asm/acpi.h | 1 -
> arch/x86/kernel/acpi/boot.c | 1 -
> drivers/acpi/pci_link.c | 11 +++++++++--
> 3 files changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h
> index 8d676d8..9830681 100644
> --- a/arch/x86/include/asm/acpi.h
> +++ b/arch/x86/include/asm/acpi.h
> @@ -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);
> diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
> index 8c1f76a..4c51a2f 100644
> --- a/arch/x86/kernel/acpi/boot.c
> +++ b/arch/x86/kernel/acpi/boot.c
> @@ -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;
> diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
> index fcfdef7..e52ad91 100644
> --- a/drivers/acpi/pci_link.c
> +++ b/drivers/acpi/pci_link.c
> @@ -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);
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2008-11-06 20:54 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-05 23:17 [PATCH 00/11] RFC: various ACPI core cleanups Bjorn Helgaas
2008-11-05 23:17 ` [PATCH 01/11] ACPI: update debug parameter documentation Bjorn Helgaas
2008-11-06 20:29 ` Len Brown
2008-11-06 21:22 ` Bjorn Helgaas
2008-11-06 22:15 ` Len Brown
2008-11-06 22:24 ` Randy Dunlap
2008-11-05 23:17 ` [PATCH 02/11] ACPI: remove comments about debug layer/level to use Bjorn Helgaas
2008-11-06 20:30 ` Len Brown
2008-11-05 23:17 ` [PATCH 03/11] ACPI: SBS: remove useless acpi_cm_sbs_init() initcall Bjorn Helgaas
2008-11-06 20:31 ` Len Brown
2008-11-05 23:17 ` [PATCH 04/11] ACPI: pci_link: remove acpi_irq_balance_set() interface Bjorn Helgaas
2008-11-06 20:41 ` Len Brown [this message]
2008-11-05 23:17 ` [PATCH 05/11] ACPI: remove CONFIG_ACPI_POWER Bjorn Helgaas
2008-11-06 20:42 ` Len Brown
2008-11-05 23:18 ` [PATCH 06/11] ACPI: remove CONFIG_ACPI_EC Bjorn Helgaas
2008-11-06 20:57 ` Len Brown
2008-11-05 23:18 ` [PATCH 07/11] ACPI: add CONFIG_ACPI_PCI Bjorn Helgaas
2008-11-06 19:41 ` Bjorn Helgaas
2008-11-05 23:18 ` [PATCH 08/11] ACPI: remove ACPI dependency on PCI Bjorn Helgaas
2008-11-05 23:18 ` [PATCH 09/11] ACPI: remove ACPI dependency on PM Bjorn Helgaas
2008-11-05 23:18 ` [PATCH 10/11] ia64: remove automatic PM selection Bjorn Helgaas
2008-11-05 23:18 ` [PATCH 11/11] ACPI: call core init functions explicitly instead of using initcalls Bjorn Helgaas
2008-11-06 22:02 ` Len Brown
2008-11-06 23:40 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.00.0811061541140.3106@localhost.localdomain \
--to=lenb@kernel.org \
--cc=astarikovskiy@suse.de \
--cc=bjorn.helgaas@hp.com \
--cc=linux-acpi@vger.kernel.org \
--cc=yakui.zhao@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox