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 X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4D04C432BE for ; Mon, 23 Aug 2021 16:47:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9AB52613B1 for ; Mon, 23 Aug 2021 16:47:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229971AbhHWQsL convert rfc822-to-8bit (ORCPT ); Mon, 23 Aug 2021 12:48:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:40468 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbhHWQsJ (ORCPT ); Mon, 23 Aug 2021 12:48:09 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4C4E261371; Mon, 23 Aug 2021 16:47:27 +0000 (UTC) Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mID6b-006heX-5L; Mon, 23 Aug 2021 17:47:25 +0100 Date: Mon, 23 Aug 2021 17:47:24 +0100 Message-ID: <8735r0qfab.wl-maz@kernel.org> From: Marc Zyngier To: Pali =?UTF-8?B?Um9ow6Fy?= Cc: Lorenzo Pieralisi , Thomas Petazzoni , Bjorn Helgaas , Rob Herring , Marek =?UTF-8?B?QmVow7pu?= , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/7] PCI: aardvark: Check for virq mapping when processing INTx IRQ In-Reply-To: <20210823163305.okizte3ejnm6ltra@pali> References: <20210625090319.10220-1-pali@kernel.org> <20210625090319.10220-3-pali@kernel.org> <20210823163305.okizte3ejnm6ltra@pali> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: pali@kernel.org, lorenzo.pieralisi@arm.com, thomas.petazzoni@bootlin.com, bhelgaas@google.com, robh@kernel.org, kabel@kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 23 Aug 2021 17:33:05 +0100, Pali Rohár wrote: > > On Friday 06 August 2021 09:29:02 Marc Zyngier wrote: > > On 2021-06-25 10:03, Pali Rohár wrote: > > > It is possible that we receive spurious INTx interrupt. So add needed > > > check > > > before calling generic_handle_irq() function. > > > > > > Signed-off-by: Pali Rohár > > > Reviewed-by: Marek Behún > > > Cc: stable@vger.kernel.org > > > --- > > > drivers/pci/controller/pci-aardvark.c | 6 +++++- > > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/pci/controller/pci-aardvark.c > > > b/drivers/pci/controller/pci-aardvark.c > > > index 36fcc077ec72..59f91fad2481 100644 > > > --- a/drivers/pci/controller/pci-aardvark.c > > > +++ b/drivers/pci/controller/pci-aardvark.c > > > @@ -1226,7 +1226,11 @@ static void advk_pcie_handle_int(struct advk_pcie > > > *pcie) > > > PCIE_ISR1_REG); > > > > > > virq = irq_find_mapping(pcie->irq_domain, i); > > > - generic_handle_irq(virq); > > > + if (virq) > > > + generic_handle_irq(virq); > > > + else > > > + dev_err_ratelimited(&pcie->pdev->dev, "unexpected INT%c IRQ\n", > > > + (char)i+'A'); > > > } > > > } > > > > Please use generic_handle_domain_irq() instead of irq_find_mapping() > > and generic_handle_irq(). > > Ok! At the time when I was sending these patches there was no function > generic_handle_domain_irq(). > > As all these interrupt related patches are targeting also stable tress > where is no generic_handle_domain_irq() function too, it would be easier > for backporting to use irq_find_mapping() + generic_handle_irq(). And > later after applying all interrupt related patches, include a patch > which converts all usage to generic_handle_domain_irq(). That's not how it works, and I have already done the work converting all the existing users to the new API, already queued in -next. Please send a patch that makes sense for upstream, and a different patch that applies to previous version. M. -- Without deviation from the norm, progress is not possible.