Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932434AbcKGPyM (ORCPT ); Mon, 7 Nov 2016 10:54:12 -0500 Received: from hqemgate14.nvidia.com ([216.228.121.143]:10296 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932226AbcKGPyL (ORCPT ); Mon, 7 Nov 2016 10:54:11 -0500 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Mon, 07 Nov 2016 07:54:09 -0800 Subject: Re: BUG? genirq: irq 14 uses trigger mode 8; requested 0 To: Mika Westerberg , Marc Zyngier References: <20161101130231.GD1436@lahna.fi.intel.com> <57b67069-8fc0-800f-b869-1eec3d64111f@nvidia.com> <20161101144400.GE1436@lahna.fi.intel.com> <20161107114902.GA1447@lahna.fi.intel.com> <20161107145914.GB1447@lahna.fi.intel.com> CC: Thomas Gleixner , From: Jon Hunter Message-ID: <3c6f015b-e4d3-5835-fc8e-412fa3f6a481@nvidia.com> Date: Mon, 7 Nov 2016 15:50:37 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161107145914.GB1447@lahna.fi.intel.com> X-Originating-IP: [10.21.132.110] X-ClientProxiedBy: DRUKMAIL101.nvidia.com (10.25.59.19) To UKMAIL101.nvidia.com (10.26.138.13) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1709 Lines: 48 On 07/11/16 14:59, Mika Westerberg wrote: > 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. Good to know. The more I think about this, the more I wonder if we should have a dummy 'set_type' as this is just hiding the issue. If the original warning does not impact the overall behaviour (ie. interrupts still working) then may be it is legitimate as far as gen-irq is concerned? Jon -- nvpublic