From patchwork Tue Jun 9 18:26:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 6574571 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EADC2C0020 for ; Tue, 9 Jun 2015 18:31:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D7CAA20351 for ; Tue, 9 Jun 2015 18:31:06 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1D9AA20386 for ; Tue, 9 Jun 2015 18:31:05 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z2OGM-0002yb-AF; Tue, 09 Jun 2015 18:28:38 +0000 Received: from mail-ob0-x229.google.com ([2607:f8b0:4003:c01::229]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z2OFa-0002Ns-Lg for linux-arm-kernel@lists.infradead.org; Tue, 09 Jun 2015 18:27:51 +0000 Received: by obbir4 with SMTP id ir4so18680617obb.1 for ; Tue, 09 Jun 2015 11:27:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=V5OBS2p5qU3+j+s5nTcmHDmvP20M6gL+OWpNULIYpfM=; b=L1uGMrc8sYZtvWo0xRGhiSh86uHw2aiPV9FOcbE4fBo5vhgkv0ulQbyl2Idqc+meeZ ekTrU4zK9KQXxexcss6fouER8+PMscB/DO/awKIs+d1Cip4+Cm32xzVibfqU7UiKpajq /iTMYA4CGZ6HRBiJXOYyYS1gvCw7nDtIBP4av873WXdU0rReqGwxR3QRzFrZz2jzU/pL LcBc6KJqAaeSs8zrZe/m3wHwcVbbCLdrsxqd/E+Bzfjeq33ogOCwdjniqWicYmQwIHo5 9pEzgxByS7wkBF5+A25jLcyZ8eeN07P8KH3/N5+j6BPrCX+ibsIu11jeFkvmv22ave4B uE6w== X-Received: by 10.60.123.51 with SMTP id lx19mr20726368oeb.46.1433874434539; Tue, 09 Jun 2015 11:27:14 -0700 (PDT) Received: from rob-hp-laptop.herring.priv (72-48-98-129.dyn.grandenetworks.net. [72.48.98.129]) by mx.google.com with ESMTPSA id sm8sm4749946obb.13.2015.06.09.11.27.13 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Jun 2015 11:27:14 -0700 (PDT) From: Rob Herring To: Russell King , linux-arm-kernel@lists.infradead.org Subject: [PATCH 10/15] PCI: kill off set_irq_flags usage Date: Tue, 9 Jun 2015 13:26:36 -0500 Message-Id: <1433874401-27161-11-git-send-email-robh@kernel.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1433874401-27161-1-git-send-email-robh@kernel.org> References: <1433874401-27161-1-git-send-email-robh@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150609_112750_838072_299F03FD X-CRM114-Status: GOOD ( 12.59 ) X-Spam-Score: 0.3 (/) Cc: Rob Herring , Michal Simek , Simon Horman , Stephen Warren , linux-sh@vger.kernel.org, Jingoo Han , Pratyush Anand , linux-kernel@vger.kernel.org, Kishon Vijay Abraham I , linux-tegra@vger.kernel.org, arm@kernel.org, Thierry Reding , Murali Karicheri , linux-pci@vger.kernel.org, Bjorn Helgaas , linux-omap@vger.kernel.org, Alexandre Courbot , =?UTF-8?q?S=C3=B6ren=20Brinkmann?= X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP set_irq_flags is ARM specific with custom flags which have genirq equivalents. Convert drivers to use the genirq interfaces directly, so we can kill off set_irq_flags. The translation of flags is as follows: IRQF_VALID -> !IRQ_NOREQUEST IRQF_PROBE -> !IRQ_NOPROBE IRQF_NOAUTOEN -> IRQ_NOAUTOEN For IRQs managed by an irqdomain, the irqdomain core code handles clearing and setting IRQ_NOREQUEST already, so there is no need to do this in .map() functions and we can simply remove the set_irq_flags calls. Some users also set IRQ_NOPROBE and this has been maintained although it is not clear that is really needed. There appears to be a great deal of blind copy and paste of this code. Signed-off-by: Rob Herring Cc: Kishon Vijay Abraham I Cc: Bjorn Helgaas Cc: Murali Karicheri Cc: Thierry Reding Cc: Stephen Warren Cc: Alexandre Courbot Cc: Jingoo Han Cc: Pratyush Anand Cc: Simon Horman Cc: Michal Simek Cc: "Sören Brinkmann" Cc: linux-omap@vger.kernel.org Cc: linux-pci@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-tegra@vger.kernel.org Cc: linux-sh@vger.kernel.org Acked-by: Bjorn Helgaas --- drivers/pci/host/pci-dra7xx.c | 1 - drivers/pci/host/pci-keystone-dw.c | 2 -- drivers/pci/host/pci-tegra.c | 1 - drivers/pci/host/pcie-designware.c | 1 - drivers/pci/host/pcie-rcar.c | 1 - drivers/pci/host/pcie-xilinx.c | 2 -- 6 files changed, 8 deletions(-) diff --git a/drivers/pci/host/pci-dra7xx.c b/drivers/pci/host/pci-dra7xx.c index 2d57e19..94cbc4d 100644 --- a/drivers/pci/host/pci-dra7xx.c +++ b/drivers/pci/host/pci-dra7xx.c @@ -160,7 +160,6 @@ static int dra7xx_pcie_intx_map(struct irq_domain *domain, unsigned int irq, { irq_set_chip_and_handler(irq, &dummy_irq_chip, handle_simple_irq); irq_set_chip_data(irq, domain->host_data); - set_irq_flags(irq, IRQF_VALID); return 0; } diff --git a/drivers/pci/host/pci-keystone-dw.c b/drivers/pci/host/pci-keystone-dw.c index f34892e..f1d0749 100644 --- a/drivers/pci/host/pci-keystone-dw.c +++ b/drivers/pci/host/pci-keystone-dw.c @@ -196,7 +196,6 @@ static int ks_dw_pcie_msi_map(struct irq_domain *domain, unsigned int irq, irq_set_chip_and_handler(irq, &ks_dw_pcie_msi_irq_chip, handle_level_irq); irq_set_chip_data(irq, domain->host_data); - set_irq_flags(irq, IRQF_VALID); return 0; } @@ -277,7 +276,6 @@ static int ks_dw_pcie_init_legacy_irq_map(struct irq_domain *d, irq_set_chip_and_handler(irq, &ks_dw_pcie_legacy_irq_chip, handle_level_irq); irq_set_chip_data(irq, d->host_data); - set_irq_flags(irq, IRQF_VALID); return 0; } diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c index 00e9272..36bd700 100644 --- a/drivers/pci/host/pci-tegra.c +++ b/drivers/pci/host/pci-tegra.c @@ -1263,7 +1263,6 @@ static int tegra_msi_map(struct irq_domain *domain, unsigned int irq, { irq_set_chip_and_handler(irq, &tegra_msi_irq_chip, handle_simple_irq); irq_set_chip_data(irq, domain->host_data); - set_irq_flags(irq, IRQF_VALID); tegra_cpuidle_pcie_irqs_in_use(); diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c index 2e9f84f..5caa94d 100644 --- a/drivers/pci/host/pcie-designware.c +++ b/drivers/pci/host/pcie-designware.c @@ -333,7 +333,6 @@ static int dw_pcie_msi_map(struct irq_domain *domain, unsigned int irq, { irq_set_chip_and_handler(irq, &dw_msi_irq_chip, handle_simple_irq); irq_set_chip_data(irq, domain->host_data); - set_irq_flags(irq, IRQF_VALID); return 0; } diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c index c086210..7678fe0 100644 --- a/drivers/pci/host/pcie-rcar.c +++ b/drivers/pci/host/pcie-rcar.c @@ -664,7 +664,6 @@ static int rcar_msi_map(struct irq_domain *domain, unsigned int irq, { irq_set_chip_and_handler(irq, &rcar_msi_irq_chip, handle_simple_irq); irq_set_chip_data(irq, domain->host_data); - set_irq_flags(irq, IRQF_VALID); return 0; } diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c index f1a06a0..72015119 100644 --- a/drivers/pci/host/pcie-xilinx.c +++ b/drivers/pci/host/pcie-xilinx.c @@ -338,7 +338,6 @@ static int xilinx_pcie_msi_map(struct irq_domain *domain, unsigned int irq, { irq_set_chip_and_handler(irq, &xilinx_msi_irq_chip, handle_simple_irq); irq_set_chip_data(irq, domain->host_data); - set_irq_flags(irq, IRQF_VALID); return 0; } @@ -377,7 +376,6 @@ static int xilinx_pcie_intx_map(struct irq_domain *domain, unsigned int irq, { irq_set_chip_and_handler(irq, &dummy_irq_chip, handle_simple_irq); irq_set_chip_data(irq, domain->host_data); - set_irq_flags(irq, IRQF_VALID); return 0; }