Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932900AbcKHJRs (ORCPT ); Tue, 8 Nov 2016 04:17:48 -0500 Received: from mga07.intel.com ([134.134.136.100]:58408 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932256AbcKHJRm (ORCPT ); Tue, 8 Nov 2016 04:17:42 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,609,1473145200"; d="scan'208";a="783807532" Date: Tue, 8 Nov 2016 11:17:38 +0200 From: Mika Westerberg To: Thomas Gleixner Cc: Jon Hunter , Marc Zyngier , linux-kernel@vger.kernel.org Subject: Re: BUG? genirq: irq 14 uses trigger mode 8; requested 0 Message-ID: <20161108091738.GG1447@lahna.fi.intel.com> 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> <3c6f015b-e4d3-5835-fc8e-412fa3f6a481@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1749 Lines: 36 On Mon, Nov 07, 2016 at 08:29:03PM +0100, Thomas Gleixner wrote: > Subject: genirq: Use irq type from irqdata instead of irqdesc > From: Thomas Gleixner > Date: Mon, 07 Nov 2016 19:57:00 +0100 > > The type flags in the irq descriptor are there for historical reasons and > only updated via irq_modify_status() or irq_set_type(). Both functions also > update the type flags in irqdata. __setup_irq() is the only left over user > of the type flags in the irq descriptor. > > If __setup_irq() is called with empty irq type flags, then the type flags > are retrieved from irqdata. If an interrupt is shared, then the type flags > are compared with the type flags stored in the irq descriptor. > > On x86 the ioapic does not have a irq_set_type() callback because the type > is defined in the BIOS tables and cannot be changed. The type is stored in > irqdata at setup time without updating the type data in the irq > descriptor. As a result the comparison described above fails. > > There is no point in updating the irq descriptor flags because the only > relevant storage is irqdata. Use the type flags from irqdata for both > retrieval and comparison in __setup_irq() instead. > > Aside of that the print out in case of non matching type flags has the old > and new type flags arguments flipped. Fix that as well. > > For correctness sake the flags stored in the irq descriptor should be > removed, but this is beyond the scope of this bugfix and will be done in a > later patch. > > Fixes: 4b357daed698 ("genirq: Look-up trigger type if not specified by caller") > Reported-by: Mika Westerberg This fixes it, thanks a lot! Tested-by: Mika Westerberg