Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4875988iob; Mon, 9 May 2022 03:50:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNBHzHJF57tW/KnHLQh8/F1Tob3cAKPqiFXrl35vJcnCXKz7JMrnlDQ7ClyT4b1u8ht+PY X-Received: by 2002:a17:90b:1d87:b0:1dc:a9c0:3d49 with SMTP id pf7-20020a17090b1d8700b001dca9c03d49mr26033297pjb.12.1652093400649; Mon, 09 May 2022 03:50:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652093400; cv=none; d=google.com; s=arc-20160816; b=jtoSpukMU1vKYt7sI8qUAtF0OblJtbXsGm2nlMPt4V6Cjp/LEdMwVKOx5vN/4Jvk8j ouVh3vi7zuzF0s2mKMF3WUlon1l0RnPA33JbzeKvxXdVbocHlzB/G0HJIUIghTvJqOvY Oqj1MVhnfQb3b5UyD6CYazR9Rp9TltgDbHQgSsL0jPtwlTGpCPaxH3vIYkqi6b1S4uft VkR6nA3SKZPz+VfsVStS77gKyMFWg2H0QvWI7fID/12M2ZZHwBYNWyCCiJD35OHjQFkv 7A30fccK/T0VwGVwUY7r/PS+P2Pu1y+gPjqpwD5TvEN6bm4o4orNoojpkTHD0CI0V4sd 3Z8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=opXHAg+x2oLwOh9vylHS0/sQ5iKZLEtunkiuMimOKo8=; b=yVTyvn+KbsxllVL0tXC/TtIaePD19ZfJ/w9PuAarOSu4vdIJ5TlcQBa7Gve3G2pVLx 98OtjcbVY5va0lEJQAkDHkjJsTuqcD5K8PCgspiYIxKufjnCjChLVKDOtV5OCHVLMezY 1jmEbM3++QbAY8mdcoLZJ1sn6KmVMv1DfYBqQyTeWw3fsN2vv87XcoAG94c40XtvfnIw QTIA0F6kRBj6h/qEss4do0B/+Ua9TWwxN3bpDeREC5Q/hlUgkz6JA54+W1+zpBCHvH/g YwVueeG9Mn49pTmWD4gmBDbkpBuv0TaKGF++xYCkIcHge+so/2Er0n4CJxS9rzJyNo0J +RIg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id d20-20020a631d14000000b003816043f0f2si13740854pgd.743.2022.05.09.03.50.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 03:50:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D97192380C2; Mon, 9 May 2022 03:10:25 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238470AbiEIJgI (ORCPT + 99 others); Mon, 9 May 2022 05:36:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237359AbiEII60 (ORCPT ); Mon, 9 May 2022 04:58:26 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 386951FB2CC; Mon, 9 May 2022 01:54:33 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EF85F1042; Mon, 9 May 2022 01:54:32 -0700 (PDT) Received: from FVFF77S0Q05N (unknown [10.57.3.22]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 203253F66F; Mon, 9 May 2022 01:54:28 -0700 (PDT) Date: Mon, 9 May 2022 09:54:21 +0100 From: Mark Rutland To: Lukas Wunner Cc: maz@kernel.org, Linus Walleij , Bartosz Golaszewski , linux-gpio@vger.kernel.org, Octavian Purdila , linux-kernel@vger.kernel.org, aou@eecs.berkeley.edu, catalin.marinas@arm.com, deanbo422@gmail.com, green.hu@gmail.com, guoren@kernel.org, jonas@southpole.se, kernelfans@gmail.com, linux-arm-kernel@lists.infradead.org, linux@armlinux.org.uk, nickhu@andestech.com, palmer@dabbelt.com, paul.walmsley@sifive.com, shorne@gmail.com, stefan.kristiansson@saunalahti.fi, tglx@linutronix.de, tsbogend@alpha.franken.de, vgupta@kernel.org, vladimir.murzin@arm.com, will@kernel.org Subject: Re: [PATCH v2 17/17] irq: remove handle_domain_{irq,nmi}() Message-ID: References: <20211026092504.27071-1-mark.rutland@arm.com> <20211026092504.27071-18-mark.rutland@arm.com> <20220506203242.GA1855@wunner.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220506203242.GA1855@wunner.de> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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-kernel@vger.kernel.org On Fri, May 06, 2022 at 10:32:42PM +0200, Lukas Wunner wrote: > On Tue, Oct 26, 2021 at 10:25:04AM +0100, Mark Rutland wrote: > > Now that entry code handles IRQ entry (including setting the IRQ regs) > > before calling irqchip code, irqchip code can safely call > > generic_handle_domain_irq(), and there's no functional reason for it to > > call handle_domain_irq(). > > > > Let's cement this split of responsibility and remove handle_domain_irq() > > entirely, updating irqchip drivers to call generic_handle_domain_irq(). > > > > For consistency, handle_domain_nmi() is similarly removed and replaced > > with a generic_handle_domain_nmi() function which also does not perform > > any entry logic. > > > > Previously handle_domain_{irq,nmi}() had a WARN_ON() which would fire > > when they were called in an inappropriate context. So that we can > > identify similar issues going forward, similar WARN_ON_ONCE() logic is > > added to the generic_handle_*() functions, and comments are updated for > > clarity and consistency. > [...] > > int generic_handle_domain_irq(struct irq_domain *domain, unsigned int hwirq) > > { > > + WARN_ON_ONCE(!in_irq()); > > return handle_irq_desc(irq_resolve_mapping(domain, hwirq)); > > } > > EXPORT_SYMBOL_GPL(generic_handle_domain_irq); > > Why isn't the WARN_ON_ONCE() conditional on handle_enforce_irqctx()? > (See handle_irq_desc() and c16816acd086.) I did this for consistency with the in_nmi() check in generic_handle_domain_nmi(); I was unaware of commit c16816acd086 and IRQD_HANDLE_ENFORCE_IRQCTX. I'll have ot leave it to Marc and Thomas as to what we should do there. > I believe the above change causes a regression in drivers/gpio/gpio-dln2.c > such that a gratuitous WARN splat is now emitted. Do you mean you beleive that from inspection, or are you actually seeing this go wrong in practice? If it's the latter, are you able to give a copy of the dmesg splat? Thanks, Mark.