summaryrefslogtreecommitdiffstats
path: root/drivers/irqchip/irq-xtensa-pic.c
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2017-06-05 11:43:51 +0200
committerMax Filippov <jcmvbkbc@gmail.com>2017-06-06 01:53:10 +0200
commite5c86679d5e864947a52fb31e45a425dea3e7fa9 (patch)
treec0eb37a4f2386c131ddb2725f4ac4ae781402473 /drivers/irqchip/irq-xtensa-pic.c
parentxtensa: reduce double exception literal reservation (diff)
downloadlinux-e5c86679d5e864947a52fb31e45a425dea3e7fa9.tar.xz
linux-e5c86679d5e864947a52fb31e45a425dea3e7fa9.zip
xtensa: don't use linux IRQ #0
Linux IRQ #0 is reserved for error reporting and may not be used. Increase NR_IRQS for one additional slot and increase irq_domain_add_legacy parameter first_irq value to 1, so that linux IRQ #0 is not associated with hardware IRQ #0 in legacy IRQ domains. Introduce macro XTENSA_PIC_LINUX_IRQ for static translation of xtensa PIC hardware IRQ # to linux IRQ #. Use this macro in XTFPGA platform data definitions. This fixes inability to use hardware IRQ #0 in configurations that don't use device tree and allows for non-identity mapping between linux IRQ # and hardware IRQ #. Cc: stable@vger.kernel.org Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'drivers/irqchip/irq-xtensa-pic.c')
-rw-r--r--drivers/irqchip/irq-xtensa-pic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/irqchip/irq-xtensa-pic.c b/drivers/irqchip/irq-xtensa-pic.c
index 472ae1770964..f728755fa292 100644
--- a/drivers/irqchip/irq-xtensa-pic.c
+++ b/drivers/irqchip/irq-xtensa-pic.c
@@ -89,7 +89,7 @@ static struct irq_chip xtensa_irq_chip = {
int __init xtensa_pic_init_legacy(struct device_node *interrupt_parent)
{
struct irq_domain *root_domain =
- irq_domain_add_legacy(NULL, NR_IRQS, 0, 0,
+ irq_domain_add_legacy(NULL, NR_IRQS - 1, 1, 0,
&xtensa_irq_domain_ops, &xtensa_irq_chip);
irq_set_default_host(root_domain);
return 0;