lkml.org 
[lkml]   [2011]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] x86, ioapic: Skip looking for ioapic overrides when ioapics are not present

* Florian Mickler <florian@mickler.org> wrote:

> --- a/arch/x86/kernel/apic/io_apic.c
> +++ b/arch/x86/kernel/apic/io_apic.c
> @@ -3789,6 +3789,10 @@ int acpi_get_override_irq(u32 gsi, int *trigger, int *polarity)
> {
> int ioapic, pin, idx;
>
> +#ifdef CONFIG_ACPI
> + if (acpi_irq_model != ACPI_IRQ_MODEL_IOAPIC)
> + return -1;
> +#endif

That #ifdef is very ugly. Please introduce a suitable helper function in
arch/x86/include/asm/acpi.h - acpi_irq_ioapic_model() or so, which could be
used like this:

if (!acpi_irq_ioapic_model())
return -1;

And would be defined in the !CONFIG_ACPI case as well.

Thanks,

Ingo


\
 
 \ /
  Last update: 2011-04-01 08:23    [W:0.062 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site