Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2723637iob; Mon, 16 May 2022 05:01:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQ1NUym5oSltLvBliRvm6z9RrJssL7kApxKU5eFyUPBCk3SCDy4NXYmJzrsE/ypASh6u+o X-Received: by 2002:a05:600c:4f06:b0:394:836b:1552 with SMTP id l6-20020a05600c4f0600b00394836b1552mr26614844wmq.145.1652702497833; Mon, 16 May 2022 05:01:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652702497; cv=none; d=google.com; s=arc-20160816; b=0W9ArSFAsPSJTkd4vDwjX4n962u1hFn0cJmGbSaklItkgezQoWXNC5KOTDrxW+NdM1 jAzfNV6JF6J5v7z7UZTkAi27JXhq6uoaRkO5tmzEosbQvGhF5LX1eoEIt/9tmeX4rJT1 sK8RPd53ryVKRHOl/PnL2/BOo3ciP2/rBCv0VIEXMppgcMvHV3FX4bni7wcr2jdKJGd2 V2aphLB4s8VV6snreYBjfM/mMT9ZTE3wqYV/gJv51mV2gKY67OQNzF2vOOKoy89td0gE KPp+MtqUReMG5ElGg2hocLTmVoY//tXszJRXev+fXZS1myrvKdop+F1mbSZzZ7zpb2BV adBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=spl+ssVyj5jPczyFC+4PK21rrkPMoiuL/wCF0qg1mVM=; b=VpezWSEtGen7dl5kC3Sv8zePPR+bUBDJc5ELfexqFlwc9E3wjEvCiz7es1BAYlCzJ/ 2G4dGgKR1z1DBVmYClXXqL3B5Dw0Iaq0J6F81sPAXBZ6WxQ1Q5Ht8L41t/NaYemXb2Qv HUIZaFMzBAqc3M7C+0Jb6v4dYnDF+3LdzA706f6baBf6cHWfSUV99HB6k4fJ/kuYx24g /FkgcX1CwN04uUAbJ5X0oG5PSniaoiGx1jFxHXHWt0ydYtBSC5IxHtnaY9vfeWmXkZVW qqyhsJPs66e54pZCEoe5xecSfyk3VVO756bHtae3L+s3rVdn/7SadCyhC7UG5kdEP4gO dsYA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i65-20020a1c3b44000000b0038c77be9c90si9453909wma.88.2022.05.16.05.01.03; Mon, 16 May 2022 05:01:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241408AbiEPKST (ORCPT + 70 others); Mon, 16 May 2022 06:18:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233302AbiEPKSQ (ORCPT ); Mon, 16 May 2022 06:18:16 -0400 Received: from bmailout1.hostsharing.net (bmailout1.hostsharing.net [IPv6:2a01:37:1000::53df:5f64:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 434E0DE97; Mon, 16 May 2022 03:18:16 -0700 (PDT) Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL TLS DV RSA Mixed SHA256 2020 CA-1" (verified OK)) by bmailout1.hostsharing.net (Postfix) with ESMTPS id EB3D4300002A8; Mon, 16 May 2022 12:18:14 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id DF4F129FE74; Mon, 16 May 2022 12:18:14 +0200 (CEST) Date: Mon, 16 May 2022 12:18:14 +0200 From: Lukas Wunner To: Sebastian Andrzej Siewior Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Bartosz Golaszewski , Basavaraj Natikar , Hans de Goede , Linus Walleij , Mark Gross , Michael Buesch , Rafa?? Mi??ecki , Shyam Sundar S K , linux-gpio@vger.kernel.org, linux-wireless@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: Re: [RFC PATCH] genirq: Provide generic_handle_domain_irq_safe(). Message-ID: <20220516101814.GA18490@wunner.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Mon, May 09, 2022 at 04:04:08PM +0200, Sebastian Andrzej Siewior wrote: > The problem with generic_handle_domain_irq() is that with `threadirqs' > it will trigger "WARN_ON_ONCE(!in_hardirq())". Now silenced by: https://git.kernel.org/linus/792ea6a074ae > +int generic_handle_domain_irq_safe(struct irq_domain *domain, unsigned int hwirq) > +{ > + unsigned long flags; > + int ret; > + > + local_irq_save(flags); > + ret = handle_irq_desc(irq_resolve_mapping(domain, hwirq)); > + local_irq_restore(flags); > + return ret; > +} > +EXPORT_SYMBOL_GPL(generic_handle_domain_irq_safe); AFAICS you don't need to disable hardirqs at least for the "threadirqs" case because irq_forced_thread_fn() already does that. > drivers/bcma/driver_gpio.c | 2 +- > drivers/gpio/gpio-mlxbf2.c | 6 ++---- > drivers/pinctrl/pinctrl-amd.c | 2 +- > drivers/platform/x86/intel/int0002_vgpio.c | 3 +-- > drivers/ssb/driver_gpio.c | 6 ++++-- From a quick look, the proper solution for all of those drivers is probably to just add IRQF_NO_THREAD and be done with it. Thanks, Lukas