Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1942399imu; Thu, 24 Jan 2019 04:46:37 -0800 (PST) X-Google-Smtp-Source: ALg8bN5flDK4YjeJyoVGDD2ANJLn4PP+WS9Kk9vBFXoMHVz50Mnrfq3fF4OYP468Dm+u8/jP3c2L X-Received: by 2002:a17:902:7005:: with SMTP id y5mr6460647plk.7.1548333997673; Thu, 24 Jan 2019 04:46:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548333997; cv=none; d=google.com; s=arc-20160816; b=euQrA4fff+VtEEKY1Fi4/pvLTswvb9Kjm0IHgziZ0Vo4dSymaGFKdVzL8sDCUlLATw 7A9gycSqQ5NUBVNztElKDIa/tChUI8P/+P++KTb+bivx/GRavgTdnMHlx7IFEdpEbn7Z 2nGMdolUw1TYl3inGsi/n5CHJObPSiouhqjnZWDcxvVroWFh+81vnzcxvQCQr742UZIc smG3njhp0NVrlvbl5bUR6Ey7CVj16kc7n0P47M+t5/8ne000mOHXV/HM98Sjx65Q5Yw9 hzIUqskZugRK/j6xr1xzXbosrh5E1j7eEwICh9VgjyWqvIQjp0J++MHzH9X0XBrYVsD2 DzBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=KOf60HWfMLf8abikevJjdDQ+heqhR6zZM2Iwxrps9Hc=; b=pJTiPcWRTLLK+0nxt+e1xtD7wtkEfgbojahUhlQncQvuiMGIALtQ1MASoP+WLEBIf/ vMphlEsZJMUxvBM43hZ8g5DEYBzaC29WuO/9PS1SplMmqDBUvQW3XqAOf+xWdD4U/KBo d4yNTHSzyUAS1eam+Kxk6IsH34zyk7x/MoMG05AERJKnSZbTwU9GCKNylTdRDL7doI6N zRW4HntUlyh5KdzkNRVMGSG/6I+eTlUhsF+TsBuOf1r6vZG1g8lKl9yXXFFEGhos0f8x 5ctzTcQqY2zWIwQ7Q12QoV4on3rWT6cHWPeTgmGBYf+//99Fkt9hz2l/hYbDExexz/Ci rjLw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k17si10380264pgl.62.2019.01.24.04.46.22; Thu, 24 Jan 2019 04:46:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727888AbfAXMpc (ORCPT + 99 others); Thu, 24 Jan 2019 07:45:32 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:56222 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726014AbfAXMpb (ORCPT ); Thu, 24 Jan 2019 07:45:31 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 765A4EBD; Thu, 24 Jan 2019 04:45:31 -0800 (PST) Received: from e107981-ln.cambridge.arm.com (e107981-ln.cambridge.arm.com [10.1.197.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CC0143F237; Thu, 24 Jan 2019 04:45:29 -0800 (PST) Date: Thu, 24 Jan 2019 12:45:27 +0000 From: Lorenzo Pieralisi To: Kishon Vijay Abraham I , marc.zyngier@arm.com Cc: Murali Karicheri , Gustavo Pimentel , Bjorn Helgaas , Jingoo Han , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 02/10] PCI: keystone: Use "dummy_irq_chip" instead of new irqchip for legacy interrupt handling Message-ID: <20190124124526.GC23362@e107981-ln.cambridge.arm.com> References: <20181219124207.13479-1-kishon@ti.com> <20181219124207.13479-3-kishon@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181219124207.13479-3-kishon@ti.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 19, 2018 at 06:11:59PM +0530, Kishon Vijay Abraham I wrote: > Instead of creating a new irqchip with empty callback functions, use > dummy_irq_chip. Since there is nothing to do in the irqchip callback > functions, use handle_simple_irq instead of handle_level_irq. > > Signed-off-by: Kishon Vijay Abraham I > --- > drivers/pci/controller/dwc/pci-keystone.c | 24 ++--------------------- > 1 file changed, 2 insertions(+), 22 deletions(-) > > diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c > index 5286a480f76b..1ef443009da5 100644 > --- a/drivers/pci/controller/dwc/pci-keystone.c > +++ b/drivers/pci/controller/dwc/pci-keystone.c > @@ -266,31 +266,12 @@ static irqreturn_t ks_pcie_handle_error_irq(struct keystone_pcie *ks_pcie) > return IRQ_HANDLED; > } > > -static void ks_pcie_ack_legacy_irq(struct irq_data *d) > -{ > -} > - > -static void ks_pcie_mask_legacy_irq(struct irq_data *d) > -{ > -} > - > -static void ks_pcie_unmask_legacy_irq(struct irq_data *d) > -{ > -} > - > -static struct irq_chip ks_pcie_legacy_irq_chip = { > - .name = "Keystone-PCI-Legacy-IRQ", > - .irq_ack = ks_pcie_ack_legacy_irq, > - .irq_mask = ks_pcie_mask_legacy_irq, > - .irq_unmask = ks_pcie_unmask_legacy_irq, > -}; > - > static int ks_pcie_init_legacy_irq_map(struct irq_domain *d, > unsigned int irq, > irq_hw_number_t hw_irq) > { > - irq_set_chip_and_handler(irq, &ks_pcie_legacy_irq_chip, > - handle_level_irq); > + irq_set_chip_and_handler(irq, &dummy_irq_chip, > + handle_simple_irq); Hi Kishon, thanks for putting it together. I think I'd rather move some of the logic for acking the interrupt in ks_pcie_handle_legacy_irq() into proper irq_chip methods than using a dummy_irq_chip (that Marc wants to deprecate). Also, the flow handler should be handle_level_irq() since that's what legacy IRQs are. I hope Marc can chime in when he has a minute to help you finalize this. Overall you are doing the right thing and I would like to get this series merged for v5.1. Thanks, Lorenzo > irq_set_chip_data(irq, d->host_data); > > return 0; > @@ -298,7 +279,6 @@ static int ks_pcie_init_legacy_irq_map(struct irq_domain *d, > > static const struct irq_domain_ops ks_pcie_legacy_irq_domain_ops = { > .map = ks_pcie_init_legacy_irq_map, > - .xlate = irq_domain_xlate_onetwocell, > }; > > /** > -- > 2.17.1 >