* [PATCH] irqchip: Return -EPERM for reserved IRQs
@ 2013-06-08 13:04 Grant Likely
2013-06-08 20:18 ` Grant Likely
2013-06-10 7:45 ` Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: Grant Likely @ 2013-06-08 13:04 UTC (permalink / raw)
To: linux-arm-kernel
The irqdomain core will report a log message for any attempted map call
that fails unless the error code is -EPERM. This patch changes the
Versatile irq controller drivers to use -EPERM because it is normal for
a subset of the IRQ inputs to be marked as reserved on the various
Versatile platforms.
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
---
drivers/irqchip/irq-versatile-fpga.c | 2 +-
drivers/irqchip/irq-vic.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-versatile-fpga.c b/drivers/irqchip/irq-versatile-fpga.c
index 065b7a3..47a52ab 100644
--- a/drivers/irqchip/irq-versatile-fpga.c
+++ b/drivers/irqchip/irq-versatile-fpga.c
@@ -119,7 +119,7 @@ static int fpga_irqdomain_map(struct irq_domain *d, unsigned int irq,
/* Skip invalid IRQs, only register handlers for the real ones */
if (!(f->valid & BIT(hwirq)))
- return -ENOTSUPP;
+ return -EPERM;
irq_set_chip_data(irq, f);
irq_set_chip_and_handler(irq, &f->chip,
handle_level_irq);
diff --git a/drivers/irqchip/irq-vic.c b/drivers/irqchip/irq-vic.c
index 884d11c..2bbb004 100644
--- a/drivers/irqchip/irq-vic.c
+++ b/drivers/irqchip/irq-vic.c
@@ -197,7 +197,7 @@ static int vic_irqdomain_map(struct irq_domain *d, unsigned int irq,
/* Skip invalid IRQs, only register handlers for the real ones */
if (!(v->valid_sources & (1 << hwirq)))
- return -ENOTSUPP;
+ return -EPERM;
irq_set_chip_and_handler(irq, &vic_chip, handle_level_irq);
irq_set_chip_data(irq, v->base);
set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
--
1.8.1.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] irqchip: Return -EPERM for reserved IRQs
2013-06-08 13:04 [PATCH] irqchip: Return -EPERM for reserved IRQs Grant Likely
@ 2013-06-08 20:18 ` Grant Likely
2013-06-10 7:45 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Grant Likely @ 2013-06-08 20:18 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, Jun 8, 2013 at 2:04 PM, Grant Likely <grant.likely@linaro.org> wrote:
> The irqdomain core will report a log message for any attempted map call
> that fails unless the error code is -EPERM. This patch changes the
> Versatile irq controller drivers to use -EPERM because it is normal for
> a subset of the IRQ inputs to be marked as reserved on the various
> Versatile platforms.
>
> Signed-off-by: Grant Likely <grant.likely@linaro.org>
> Cc: Linus Walleij <linus.walleij@linaro.org>
I'm going to go ahead and take this one through the irqdomain tree
since it is really an irqdomain bug fix. I'll be sending the pull
request to Linus shortly.
g.
> ---
> drivers/irqchip/irq-versatile-fpga.c | 2 +-
> drivers/irqchip/irq-vic.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/irqchip/irq-versatile-fpga.c b/drivers/irqchip/irq-versatile-fpga.c
> index 065b7a3..47a52ab 100644
> --- a/drivers/irqchip/irq-versatile-fpga.c
> +++ b/drivers/irqchip/irq-versatile-fpga.c
> @@ -119,7 +119,7 @@ static int fpga_irqdomain_map(struct irq_domain *d, unsigned int irq,
>
> /* Skip invalid IRQs, only register handlers for the real ones */
> if (!(f->valid & BIT(hwirq)))
> - return -ENOTSUPP;
> + return -EPERM;
> irq_set_chip_data(irq, f);
> irq_set_chip_and_handler(irq, &f->chip,
> handle_level_irq);
> diff --git a/drivers/irqchip/irq-vic.c b/drivers/irqchip/irq-vic.c
> index 884d11c..2bbb004 100644
> --- a/drivers/irqchip/irq-vic.c
> +++ b/drivers/irqchip/irq-vic.c
> @@ -197,7 +197,7 @@ static int vic_irqdomain_map(struct irq_domain *d, unsigned int irq,
>
> /* Skip invalid IRQs, only register handlers for the real ones */
> if (!(v->valid_sources & (1 << hwirq)))
> - return -ENOTSUPP;
> + return -EPERM;
> irq_set_chip_and_handler(irq, &vic_chip, handle_level_irq);
> irq_set_chip_data(irq, v->base);
> set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
> --
> 1.8.1.2
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] irqchip: Return -EPERM for reserved IRQs
2013-06-08 13:04 [PATCH] irqchip: Return -EPERM for reserved IRQs Grant Likely
2013-06-08 20:18 ` Grant Likely
@ 2013-06-10 7:45 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2013-06-10 7:45 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, Jun 8, 2013 at 3:04 PM, Grant Likely <grant.likely@linaro.org> wrote:
> The irqdomain core will report a log message for any attempted map call
> that fails unless the error code is -EPERM. This patch changes the
> Versatile irq controller drivers to use -EPERM because it is normal for
> a subset of the IRQ inputs to be marked as reserved on the various
> Versatile platforms.
>
> Signed-off-by: Grant Likely <grant.likely@linaro.org>
> Cc: Linus Walleij <linus.walleij@linaro.org>
Looks good:
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-06-10 7:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-08 13:04 [PATCH] irqchip: Return -EPERM for reserved IRQs Grant Likely
2013-06-08 20:18 ` Grant Likely
2013-06-10 7:45 ` Linus Walleij
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).