Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1182361

[PATCH v2 09/13] PCI: kill off set_irq_flags usage

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Rob Herring <robh@kernel.org>
Newsgroups linux.kernel
Subject [PATCH v2 09/13] PCI: kill off set_irq_flags usage
Date Sun, 12 Jul 2015 16:30:02 +0200
Message-ID <pLqqu-Rf-13@gated-at.bofh.it> (permalink)
References <pLqqt-Rf-3@gated-at.bofh.it>
X-Original-To linux-arm-kernel@lists.infradead.org, Russell King <linux@arm.linux.org.uk>
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=SgnM+gBdcFncQvi9aoSv9V30ZXxLmEped8tkxN/dCEo=; b=WvJl2Q0sOlRD72YhPOyfKKNnD2BMEapraKyL6wRqTZ8Zv4FW2TcVyjcd/H06BGkNFd BirOIG3Upz/4/dBul9cA0bOQvSclCzQy+/2/RACFawnb9/m04eY4eX4uk1EvoZ9zmmkr sZPhj00Cb0bmTBZzP7mnt58q6QiFg9QygQx7UQcs+E4nKXMn3gTQsiIrh34DPT1X3a5N 4aqVQHwV+Lui5YITFv5NihFakg3iFE5Vo3xVu8KbaIhskpbF0Wj6Ja4fW5PPgABwDz31 M3xP5ScRnWMuUY4M/Ca5iWBM125h+rM47Ghacjjsr7t1o59CEeQcQmSLqY2UedSw+fJ/ urLQ==
X-Received by 10.182.158.7 with SMTP id wq7mr411966obb.47.1436711227705; Sun, 12 Jul 2015 07:27:07 -0700 (PDT)
X-Mailer git-send-email 2.1.0
MIME-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 153
Organization linux.* mail to news gateway
X-Original-Cc linux-kernel@vger.kernel.org, arm@kernel.org, Kishon Vijay Abraham I <kishon@ti.com>, Murali Karicheri <m-karicheri2@ti.com>, Thierry Reding <thierry.reding@gmail.com>, Stephen Warren <swarren@wwwdotorg.org>, Alexandre Courbot <gnurou@gmail.com>, Jingoo Han <jingoohan1@gmail.com>, Pratyush Anand <pratyush.anand@gmail.com>, Simon Horman <horms@verge.net.au>, Michal Simek <michal.simek@xilinx.com>, Sören Brinkmann <soren.brinkmann@xilinx.com>, linux-omap@vger.kernel.org, linux-pci@vger.kernel.org, linux-tegra@vger.kernel.org, linux-sh@vger.kernel.org
X-Original-Date Sun, 12 Jul 2015 09:26:47 -0500
X-Original-Message-ID <1436711211-18223-10-git-send-email-robh@kernel.org>
X-Original-References <1436711211-18223-1-git-send-email-robh@kernel.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref aioe.org linux.kernel:1182361

Show key headers only | View raw


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 <robh@kernel.org>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Murali Karicheri <m-karicheri2@ti.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: Jingoo Han <jingoohan1@gmail.com>
Cc: Pratyush Anand <pratyush.anand@gmail.com>
Cc: Simon Horman <horms@verge.net.au>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
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
---
v2:
- Add xgene which was added in v4.2

 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/pci-xgene-msi.c   | 1 -
 drivers/pci/host/pcie-designware.c | 1 -
 drivers/pci/host/pcie-rcar.c       | 1 -
 drivers/pci/host/pcie-xilinx.c     | 2 --
 7 files changed, 9 deletions(-)

diff --git a/drivers/pci/host/pci-dra7xx.c b/drivers/pci/host/pci-dra7xx.c
index 80db09e..1a0d124 100644
--- a/drivers/pci/host/pci-dra7xx.c
+++ b/drivers/pci/host/pci-dra7xx.c
@@ -155,7 +155,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 10c0571..81df0c1 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -1248,7 +1248,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/pci-xgene-msi.c b/drivers/pci/host/pci-xgene-msi.c
index 2d31d4d..8e559d1 100644
--- a/drivers/pci/host/pci-xgene-msi.c
+++ b/drivers/pci/host/pci-xgene-msi.c
@@ -223,7 +223,6 @@ static int xgene_irq_domain_alloc(struct irq_domain *domain, unsigned int virq,
 	irq_domain_set_info(domain, virq, msi_irq,
 			    &xgene_msi_bottom_irq_chip, domain->host_data,
 			    handle_simple_irq, NULL, NULL);
-	set_irq_flags(virq, IRQF_VALID);

 	return 0;
 }
diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
index 69486be..5c6b562 100644
--- a/drivers/pci/host/pcie-designware.c
+++ b/drivers/pci/host/pcie-designware.c
@@ -350,7 +350,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;
 }
--
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 00/13] Kill off set_irq_flags Rob Herring <robh@kernel.org> - 2015-07-12 16:30 +0200
  [PATCH v2 07/13] memory: kill off set_irq_flags usage Rob Herring <robh@kernel.org> - 2015-07-12 16:30 +0200
  [PATCH v2 05/13] gpu/drm: kill off set_irq_flags usage Rob Herring <robh@kernel.org> - 2015-07-12 16:30 +0200
  [PATCH v2 08/13] mfd: kill off set_irq_flags usage Rob Herring <robh@kernel.org> - 2015-07-12 16:30 +0200
  [PATCH v2 09/13] PCI: kill off set_irq_flags usage Rob Herring <robh@kernel.org> - 2015-07-12 16:30 +0200
    Re: [PATCH v2 09/13] PCI: kill off set_irq_flags usage "Jingoo Han" <jingoohan1@gmail.com> - 2015-07-12 16:40 +0200
  [PATCH v2 06/13] irqchip: kill off set_irq_flags usage Rob Herring <robh@kernel.org> - 2015-07-12 16:30 +0200
    Re: [PATCH v2 06/13] irqchip: kill off set_irq_flags usage Thomas Gleixner <tglx@linutronix.de> - 2015-07-16 13:20 +0200
    Re: [PATCH v2 06/13] irqchip: kill off set_irq_flags usage Robert Jarzmik <robert.jarzmik@free.fr> - 2015-07-16 21:40 +0200
      Re: [PATCH v2 06/13] irqchip: kill off set_irq_flags usage Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-07-16 22:40 +0200
  [PATCH v2 04/13] gpio: kill off set_irq_flags usage Rob Herring <robh@kernel.org> - 2015-07-12 16:30 +0200
  [PATCH v2 01/13] ARM: kill off set_irq_flags usage Rob Herring <robh@kernel.org> - 2015-07-12 16:30 +0200
  [PATCH v2 13/13] arm64: remove ununsed set_irq_flags Rob Herring <robh@kernel.org> - 2015-07-12 16:30 +0200
  [PATCH v2 10/13] pinctrl: kill off set_irq_flags usage Rob Herring <robh@kernel.org> - 2015-07-12 16:30 +0200
  [PATCH v2 03/13] dma: kill off set_irq_flags usage Rob Herring <robh@kernel.org> - 2015-07-12 16:40 +0200
  [PATCH v2 02/13] clk: kill off set_irq_flags usage Rob Herring <robh@kernel.org> - 2015-07-12 16:40 +0200

csiph-web