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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9FF69C433EF for ; Wed, 11 May 2022 09:29:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WamiRpkC+QePeAntqjbiZtpBzntc2ERr2lWqmzqU+8M=; b=HLDnV49teLjV3l RWY0eBIHfHi08GINPE6W08JiKNxJKt4Q9ZOTyI6aOBfLxwGthPAe9h0w0SZqr71OgOl9LkjGGyC1z gbdsgDS4Olf6XhDXzo22NvPwH/mgurOQOcqELMX8nEpeJXSDedw7pRMMJYmMSjjpsngA4OoaRtB6M dI1s1SxcoVOPkFbGR1Jx9I3jVnH+r05RUwPv28RSCIBMZmMP5IYWIbe/RoRfwNmf4CYT5JU5pMHzB IHB0tJpTs8ClAqjozd81WmVOd0P+QiVNrbWtAS7FmVHloq5+2FxPPLGlVh4NMjIgKsx7f794G/g/d f0598Ya5FloPdb8JRiiw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1noida-0068U5-I8; Wed, 11 May 2022 09:28:06 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1noidX-0068TF-1k for linux-arm-kernel@lists.infradead.org; Wed, 11 May 2022 09:28:04 +0000 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 B71611FB; Wed, 11 May 2022 02:28:00 -0700 (PDT) Received: from FVFF77S0Q05N (unknown [10.57.3.187]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C1EC73F73D; Wed, 11 May 2022 02:27:56 -0700 (PDT) Date: Wed, 11 May 2022 10:27:47 +0100 From: Mark Rutland To: Lukas Wunner Cc: Thomas Gleixner , 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, tsbogend@alpha.franken.de, vgupta@kernel.org, vladimir.murzin@arm.com, will@kernel.org, Peter Zijlstra 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> <20220510121320.GA3020@wunner.de> <87a6bpov9u.ffs@tglx> <20220511085741.GA6558@wunner.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220511085741.GA6558@wunner.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220511_022803_174747_269B20FC X-CRM114-Status: GOOD ( 22.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, May 11, 2022 at 10:57:41AM +0200, Lukas Wunner wrote: > On Wed, May 11, 2022 at 09:23:56AM +0100, Mark Rutland wrote: > > On Wed, May 11, 2022 at 12:52:29AM +0200, Thomas Gleixner wrote: > > > + /* USB interrupts are received in softirq (tasklet) context. > > > + * Switch to hardirq context to make genirq code happy. > > > + */ > > > + local_irq_save(flags); > > > + __irq_enter_raw(); > > > + > > > if (intdata & INT_ENP_PHY_INT_) > > > - ; > > > + generic_handle_domain_irq(pdata->irqdomain, PHY_HWIRQ); > > > > Agreed. IIUC everyone agrees the __irq_enter_raw() usage is a hack, > > but what's not clear is what we *should* do > > > > I suspect that given we have generic_handle_irq_safe() for situations > > like this we should add a generic_handle_domain_irq_safe(), and use > > that in this driver? > > That way we can keep the `WARN_ON_ONCE(!in_hardirq())` in > > generic_handle_domain_irq(). > > Thomas applied 792ea6a074ae ("genirq: Remove WARN_ON_ONCE() in > generic_handle_domain_irq()") tonight: > > http://git.kernel.org/tip/tip/c/792ea6a074ae Ah; I missed that. Sorry for the noise! > That allows me to drop the controversial __irq_enter_raw() > and thus unblock my smsc95xx series. > > generic_handle_domain_irq_safe() would merely be a wrapper for > generic_handle_domain_irq() which disables local interrupts. > Then I wouldn't have to do that in smsc95xx.c. IMHO that's a > cosmetic improvement, though I'll be happy to provide a patch > if desired? I think it's a nice-to-have, but I don't have a strong feelings about it, so I think we can forget about it for now unless Marc or Thomas want it. Thanks, Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel