Re: BUG? genirq: irq 14 uses trigger mode 8; requested 0

From: Mika Westerberg
Date: Mon Nov 07 2016 - 10:05:21 EST


On Mon, Nov 07, 2016 at 02:40:47PM +0000, Marc Zyngier wrote:
> Sorry, missed this discussion entirely, as I was on the other side of
> the world. Not having a irq_set_type definitely seems odd (and
> configuring the trigger outside of the IRQ framework is quite ugly).
>
> Mika, can you please try the following (which is fully untested)?
>
> diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
> index 48e6d84..822a6b8 100644
> --- a/arch/x86/kernel/apic/io_apic.c
> +++ b/arch/x86/kernel/apic/io_apic.c
> @@ -1868,6 +1868,15 @@ static int ioapic_set_affinity(struct irq_data *irq_data,
> return ret;
> }
>
> +static int ioapic_set_type(struct irq_data *data, unsigned int flow_type)
> +{
> + /*
> + * The IOAPIC has already been programmed behind our back,
> + * just pretend it all went OK, and too bad if it didn't.
> + */
> + return 0;
> +}
> +
> static struct irq_chip ioapic_chip __read_mostly = {
> .name = "IO-APIC",
> .irq_startup = startup_ioapic_irq,
> @@ -1876,6 +1885,7 @@ static struct irq_chip ioapic_chip __read_mostly = {
> .irq_ack = irq_chip_ack_parent,
> .irq_eoi = ioapic_ack_level,
> .irq_set_affinity = ioapic_set_affinity,
> + .irq_set_type = ioapic_set_type,
> .flags = IRQCHIP_SKIP_SET_WAKE,
> };

Thanks! This fixes the problem for me.