Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1169131AbcKANLX (ORCPT ); Tue, 1 Nov 2016 09:11:23 -0400 Received: from mga05.intel.com ([192.55.52.43]:10760 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1169095AbcKANLV (ORCPT ); Tue, 1 Nov 2016 09:11:21 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,579,1473145200"; d="scan'208";a="896416979" Date: Tue, 1 Nov 2016 15:02:31 +0200 From: Mika Westerberg To: Jon Hunter Cc: Marc Zyngier , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: BUG? genirq: irq 14 uses trigger mode 8; requested 0 Message-ID: <20161101130231.GD1436@lahna.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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: 1616 Lines: 46 Hi, I started seeing following messages on Intel Broxton when the pinctrl/GPIO driver [1] loads: [ 0.645786] genirq: irq 14 uses trigger mode 8; requested 0 The driver shares interrupt with other GPIO "communities" or banks so it uses request_irq() instead of irq_set_chained_handler_and_data(). The driver does not specify IRQ flags as those come from ACPI resources. This started happen after commit 4b357daed698 ("genirq: Look-up trigger type if not specified by caller"). I think this is what happens: 1. ACPI platform sets up the interrupt according what is in the _CRS of the GPIO device. This ends up setting trigger type for irq_data of the irq. 2. First GPIO device is found and the driver calls request_irq() which calls __setup_irq() where shared == 0. 3. Since new->flags is read back from irq_data we call __irq_set_trigger() passing the flags. 4. The parent IRQ chip, IO-APIC, does not have ->irq_set_type callback so __irq_set_trigger() never calls irq_settings_set_trigger_mask() for the desciptor. 5. The second GPIO device is found and this time shared == 1 so we end up comparing nmsk with omsk where nmsk was read from irq_data and omsk is read using irq_settings_get_trigger_mask(). 6. Because we never called irq_settings_set_trigger_mask() for the descriptor, omsk is 0 and we print out a warning: [ 0.645786] genirq: irq 14 uses trigger mode 8; requested 0 If I revert commit 4b357daed698 the warning goes away. Do you have any ideas how to get rid of the warning properly? Thanks in advance. [1] drivers/pinctrl/intel/pinctrl-intel.c