From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5B2CC433FE for ; Tue, 23 Nov 2021 11:08:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231176AbhKWLLo (ORCPT ); Tue, 23 Nov 2021 06:11:44 -0500 Received: from mga05.intel.com ([192.55.52.43]:50088 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230471AbhKWLLn (ORCPT ); Tue, 23 Nov 2021 06:11:43 -0500 X-IronPort-AV: E=McAfee;i="6200,9189,10176"; a="321233595" X-IronPort-AV: E=Sophos;i="5.87,257,1631602800"; d="scan'208";a="321233595" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Nov 2021 03:08:35 -0800 X-IronPort-AV: E=Sophos;i="5.87,257,1631602800"; d="scan'208";a="497247798" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.163]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Nov 2021 03:08:32 -0800 Received: by lahna (sSMTP sendmail emulation); Tue, 23 Nov 2021 13:08:30 +0200 Date: Tue, 23 Nov 2021 13:08:30 +0200 From: Mika Westerberg To: Hans de Goede Cc: Andy Shevchenko , Linus Walleij , linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org Subject: Re: [PATCH] pinctrl: baytrail: Set IRQCHIP_SET_TYPE_MASKED flag on the irqchip Message-ID: References: <20211122220423.11256-1-hdegoede@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211122220423.11256-1-hdegoede@redhat.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Mon, Nov 22, 2021 at 11:04:23PM +0100, Hans de Goede wrote: > The byt_irq_type function ends with the IRQ masked, this means that calls > to irq_set_irq_type() while the IRQ is enabled end up masking it, which > is wrong. Add the IRQCHIP_SET_TYPE_MASKED flag to fix this. > > This will make the IRQ core call mask() + unmask() on the IRQ around > a set_type() call when the IRQ is enabled at the type of the call. > > Note in practice irq_set_irq_type() getting called while the IRQ is enabled > almost never happens. I hit this with a buggy DSDT where a wrongly active > (_STA returns 0xf) I2C ACPI devices point to an IRQ already in use by an > _AEI handler, leading to the irq_set_irq_type() call in > acpi_dev_gpio_irq_get_by() getting called while the IRQ is enabled. > > Signed-off-by: Hans de Goede Acked-by: Mika Westerberg