* [PATCH 10/15] PCI: kill off set_irq_flags usage
[not found] <1433874401-27161-1-git-send-email-robh@kernel.org>
@ 2015-06-09 18:26 ` Rob Herring
2015-06-18 16:59 ` Bjorn Helgaas
2015-06-09 18:26 ` [PATCH 12/15] SH: " Rob Herring
1 sibling, 1 reply; 9+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
To: linux-arm-kernel
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>
Cc: 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
---
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;
}
--
2.1.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 12/15] SH: kill off set_irq_flags usage
[not found] <1433874401-27161-1-git-send-email-robh@kernel.org>
2015-06-09 18:26 ` [PATCH 10/15] PCI: kill off set_irq_flags usage Rob Herring
@ 2015-06-09 18:26 ` Rob Herring
2015-07-07 0:53 ` Simon Horman
1 sibling, 1 reply; 9+ messages in thread
From: Rob Herring @ 2015-06-09 18:26 UTC (permalink / raw)
To: linux-arm-kernel
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: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: linux-sh@vger.kernel.org
---
drivers/sh/intc/internals.h | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
index 7dff08e..897ffb1 100644
--- a/drivers/sh/intc/internals.h
+++ b/drivers/sh/intc/internals.h
@@ -99,15 +99,7 @@ static inline struct intc_desc_int *get_intc_desc(unsigned int irq)
*/
static inline void activate_irq(int irq)
{
-#ifdef CONFIG_ARM
- /* ARM requires an extra step to clear IRQ_NOREQUEST, which it
- * sets on behalf of every irq_chip. Also sets IRQ_NOPROBE.
- */
- set_irq_flags(irq, IRQF_VALID);
-#else
- /* same effect on other architectures */
- irq_set_noprobe(irq);
-#endif
+ irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
}
static inline int intc_handle_int_cmp(const void *a, const void *b)
--
2.1.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 10/15] PCI: kill off set_irq_flags usage
2015-06-09 18:26 ` [PATCH 10/15] PCI: kill off set_irq_flags usage Rob Herring
@ 2015-06-18 16:59 ` Bjorn Helgaas
2015-06-18 20:08 ` Rob Herring
0 siblings, 1 reply; 9+ messages in thread
From: Bjorn Helgaas @ 2015-06-18 16:59 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jun 09, 2015 at 01:26:36PM -0500, Rob Herring wrote:
> 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>
> Cc: 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
This is the only part of the series on linux-pci, so I assume this will be
merged by somebody else along with the rest.
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
> ---
> 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;
> }
> --
> 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/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 10/15] PCI: kill off set_irq_flags usage
2015-06-18 16:59 ` Bjorn Helgaas
@ 2015-06-18 20:08 ` Rob Herring
2015-06-18 20:10 ` Bjorn Helgaas
0 siblings, 1 reply; 9+ messages in thread
From: Rob Herring @ 2015-06-18 20:08 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Jun 18, 2015 at 11:59 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> On Tue, Jun 09, 2015 at 01:26:36PM -0500, Rob Herring wrote:
>> 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>
>> Cc: 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
>
> This is the only part of the series on linux-pci, so I assume this will be
> merged by somebody else along with the rest.
I copied you on the intro, but all the lists and all the maintainers
was too long to cc. Being late in the cycle I didn't really intend for
this to be for 4.2, but you can pick up this patch if you want to as
it doesn't have any dependencies. If you don't, then I will submit the
whole series for 4.3.
> Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Thanks.
Rob
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 10/15] PCI: kill off set_irq_flags usage
2015-06-18 20:08 ` Rob Herring
@ 2015-06-18 20:10 ` Bjorn Helgaas
0 siblings, 0 replies; 9+ messages in thread
From: Bjorn Helgaas @ 2015-06-18 20:10 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Jun 18, 2015 at 3:08 PM, Rob Herring <robh@kernel.org> wrote:
> On Thu, Jun 18, 2015 at 11:59 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>> On Tue, Jun 09, 2015 at 01:26:36PM -0500, Rob Herring wrote:
>>> 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>
>>> Cc: 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
>>
>> This is the only part of the series on linux-pci, so I assume this will be
>> merged by somebody else along with the rest.
>
> I copied you on the intro, but all the lists and all the maintainers
> was too long to cc. Being late in the cycle I didn't really intend for
> this to be for 4.2, but you can pick up this patch if you want to as
> it doesn't have any dependencies. If you don't, then I will submit the
> whole series for 4.3.
OK, why don't you just include this with the rest of the series, since
I assume the whole series is related even if there's no actual
dependency.
Bjorn
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 12/15] SH: kill off set_irq_flags usage
2015-06-09 18:26 ` [PATCH 12/15] SH: " Rob Herring
@ 2015-07-07 0:53 ` Simon Horman
2015-07-07 1:55 ` Simon Horman
0 siblings, 1 reply; 9+ messages in thread
From: Simon Horman @ 2015-07-07 0:53 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jun 09, 2015 at 01:26:38PM -0500, Rob Herring wrote:
> 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: Simon Horman <horms@verge.net.au>
> Cc: Magnus Damm <magnus.damm@gmail.com>
> Cc: linux-sh@vger.kernel.org
I am trusting the description above coupled with the comments in
the original code (that this patch removes). Assuming those ducks are
aligned:
Acked-by: Simon Horman <horms+renesas@verge.net.au>
> ---
> drivers/sh/intc/internals.h | 10 +---------
> 1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
> index 7dff08e..897ffb1 100644
> --- a/drivers/sh/intc/internals.h
> +++ b/drivers/sh/intc/internals.h
> @@ -99,15 +99,7 @@ static inline struct intc_desc_int *get_intc_desc(unsigned int irq)
> */
> static inline void activate_irq(int irq)
> {
> -#ifdef CONFIG_ARM
> - /* ARM requires an extra step to clear IRQ_NOREQUEST, which it
> - * sets on behalf of every irq_chip. Also sets IRQ_NOPROBE.
> - */
> - set_irq_flags(irq, IRQF_VALID);
> -#else
> - /* same effect on other architectures */
> - irq_set_noprobe(irq);
> -#endif
> + irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
> }
>
> static inline int intc_handle_int_cmp(const void *a, const void *b)
> --
> 2.1.0
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 12/15] SH: kill off set_irq_flags usage
2015-07-07 0:53 ` Simon Horman
@ 2015-07-07 1:55 ` Simon Horman
2015-07-07 14:38 ` Rob Herring
0 siblings, 1 reply; 9+ messages in thread
From: Simon Horman @ 2015-07-07 1:55 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jul 07, 2015 at 09:53:39AM +0900, Simon Horman wrote:
> On Tue, Jun 09, 2015 at 01:26:38PM -0500, Rob Herring wrote:
> > 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: Simon Horman <horms@verge.net.au>
> > Cc: Magnus Damm <magnus.damm@gmail.com>
> > Cc: linux-sh@vger.kernel.org
>
> I am trusting the description above coupled with the comments in
> the original code (that this patch removes). Assuming those ducks are
> aligned:
>
> Acked-by: Simon Horman <horms+renesas@verge.net.au>
As I usually take patches for drivers/sh/ (there have not been many of late)
please let me know if you would like me to pick up this change.
Also, a very minor nit, the prefix for patches to this file is usually
'sh:' rather than 'SH:'.
>
> > ---
> > drivers/sh/intc/internals.h | 10 +---------
> > 1 file changed, 1 insertion(+), 9 deletions(-)
> >
> > diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
> > index 7dff08e..897ffb1 100644
> > --- a/drivers/sh/intc/internals.h
> > +++ b/drivers/sh/intc/internals.h
> > @@ -99,15 +99,7 @@ static inline struct intc_desc_int *get_intc_desc(unsigned int irq)
> > */
> > static inline void activate_irq(int irq)
> > {
> > -#ifdef CONFIG_ARM
> > - /* ARM requires an extra step to clear IRQ_NOREQUEST, which it
> > - * sets on behalf of every irq_chip. Also sets IRQ_NOPROBE.
> > - */
> > - set_irq_flags(irq, IRQF_VALID);
> > -#else
> > - /* same effect on other architectures */
> > - irq_set_noprobe(irq);
> > -#endif
> > + irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
> > }
> >
> > static inline int intc_handle_int_cmp(const void *a, const void *b)
> > --
> > 2.1.0
> >
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 12/15] SH: kill off set_irq_flags usage
2015-07-07 1:55 ` Simon Horman
@ 2015-07-07 14:38 ` Rob Herring
2015-07-08 1:04 ` Simon Horman
0 siblings, 1 reply; 9+ messages in thread
From: Rob Herring @ 2015-07-07 14:38 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jul 6, 2015 at 8:55 PM, Simon Horman <horms@verge.net.au> wrote:
> On Tue, Jul 07, 2015 at 09:53:39AM +0900, Simon Horman wrote:
>> On Tue, Jun 09, 2015 at 01:26:38PM -0500, Rob Herring wrote:
>> > 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: Simon Horman <horms@verge.net.au>
>> > Cc: Magnus Damm <magnus.damm@gmail.com>
>> > Cc: linux-sh@vger.kernel.org
>>
>> I am trusting the description above coupled with the comments in
>> the original code (that this patch removes). Assuming those ducks are
>> aligned:
>>
>> Acked-by: Simon Horman <horms+renesas@verge.net.au>
>
> As I usually take patches for drivers/sh/ (there have not been many of late)
> please let me know if you would like me to pick up this change.
This is a dependency for removing set_irq_flags from ARM, so I plan to
send the whole series to arm-soc.
> Also, a very minor nit, the prefix for patches to this file is usually
> 'sh:' rather than 'SH:'.
Okay, will fix-up.
Rob
>
>>
>> > ---
>> > drivers/sh/intc/internals.h | 10 +---------
>> > 1 file changed, 1 insertion(+), 9 deletions(-)
>> >
>> > diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
>> > index 7dff08e..897ffb1 100644
>> > --- a/drivers/sh/intc/internals.h
>> > +++ b/drivers/sh/intc/internals.h
>> > @@ -99,15 +99,7 @@ static inline struct intc_desc_int *get_intc_desc(unsigned int irq)
>> > */
>> > static inline void activate_irq(int irq)
>> > {
>> > -#ifdef CONFIG_ARM
>> > - /* ARM requires an extra step to clear IRQ_NOREQUEST, which it
>> > - * sets on behalf of every irq_chip. Also sets IRQ_NOPROBE.
>> > - */
>> > - set_irq_flags(irq, IRQF_VALID);
>> > -#else
>> > - /* same effect on other architectures */
>> > - irq_set_noprobe(irq);
>> > -#endif
>> > + irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
>> > }
>> >
>> > static inline int intc_handle_int_cmp(const void *a, const void *b)
>> > --
>> > 2.1.0
>> >
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 12/15] SH: kill off set_irq_flags usage
2015-07-07 14:38 ` Rob Herring
@ 2015-07-08 1:04 ` Simon Horman
0 siblings, 0 replies; 9+ messages in thread
From: Simon Horman @ 2015-07-08 1:04 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jul 07, 2015 at 09:38:53AM -0500, Rob Herring wrote:
> On Mon, Jul 6, 2015 at 8:55 PM, Simon Horman <horms@verge.net.au> wrote:
> > On Tue, Jul 07, 2015 at 09:53:39AM +0900, Simon Horman wrote:
> >> On Tue, Jun 09, 2015 at 01:26:38PM -0500, Rob Herring wrote:
> >> > 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: Simon Horman <horms@verge.net.au>
> >> > Cc: Magnus Damm <magnus.damm@gmail.com>
> >> > Cc: linux-sh@vger.kernel.org
> >>
> >> I am trusting the description above coupled with the comments in
> >> the original code (that this patch removes). Assuming those ducks are
> >> aligned:
> >>
> >> Acked-by: Simon Horman <horms+renesas@verge.net.au>
> >
> > As I usually take patches for drivers/sh/ (there have not been many of late)
> > please let me know if you would like me to pick up this change.
>
> This is a dependency for removing set_irq_flags from ARM, so I plan to
> send the whole series to arm-soc.
Thanks, that is fine by me.
> > Also, a very minor nit, the prefix for patches to this file is usually
> > 'sh:' rather than 'SH:'.
>
> Okay, will fix-up.
>
> Rob
>
> >
> >>
> >> > ---
> >> > drivers/sh/intc/internals.h | 10 +---------
> >> > 1 file changed, 1 insertion(+), 9 deletions(-)
> >> >
> >> > diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
> >> > index 7dff08e..897ffb1 100644
> >> > --- a/drivers/sh/intc/internals.h
> >> > +++ b/drivers/sh/intc/internals.h
> >> > @@ -99,15 +99,7 @@ static inline struct intc_desc_int *get_intc_desc(unsigned int irq)
> >> > */
> >> > static inline void activate_irq(int irq)
> >> > {
> >> > -#ifdef CONFIG_ARM
> >> > - /* ARM requires an extra step to clear IRQ_NOREQUEST, which it
> >> > - * sets on behalf of every irq_chip. Also sets IRQ_NOPROBE.
> >> > - */
> >> > - set_irq_flags(irq, IRQF_VALID);
> >> > -#else
> >> > - /* same effect on other architectures */
> >> > - irq_set_noprobe(irq);
> >> > -#endif
> >> > + irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
> >> > }
> >> >
> >> > static inline int intc_handle_int_cmp(const void *a, const void *b)
> >> > --
> >> > 2.1.0
> >> >
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> >> the body of a message to majordomo@vger.kernel.org
> >> More majordomo info at http://vger.kernel.org/majordomo-info.html
> >>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-07-08 1:04 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1433874401-27161-1-git-send-email-robh@kernel.org>
2015-06-09 18:26 ` [PATCH 10/15] PCI: kill off set_irq_flags usage Rob Herring
2015-06-18 16:59 ` Bjorn Helgaas
2015-06-18 20:08 ` Rob Herring
2015-06-18 20:10 ` Bjorn Helgaas
2015-06-09 18:26 ` [PATCH 12/15] SH: " Rob Herring
2015-07-07 0:53 ` Simon Horman
2015-07-07 1:55 ` Simon Horman
2015-07-07 14:38 ` Rob Herring
2015-07-08 1:04 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).