xtensa: don't use linux IRQ #0
Subsystems (3)
Max Filippov
maintainerPATCH 1/1 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. This fixes inability to use hardware IRQ #0 in configurations that don't use device tree.
Signed-off-by Max Filippov <[email protected]>
--- arch/xtensa/include/asm/irq.h | 2 +- arch/xtensa/kernel/irq.c | 5 ----- drivers/irqchip/irq-xtensa-mx.c | 2 +- drivers/irqchip/irq-xtensa-pic.c | 2 +- 4 files changed, 3 insertions(+), 8 deletions(-)
arch/xtensa/include/asm/irq.h +1 -1
@@ -29,7 +29,7 @@ static inline void variant_irq_disable(unsigned int irq) { }# define PLATFORM_NR_IRQS 0#endif #define XTENSA_NR_IRQS XCHAL_NUM_INTERRUPTS -#define NR_IRQS (XTENSA_NR_IRQS + VARIANT_NR_IRQS + PLATFORM_NR_IRQS) +#define NR_IRQS (XTENSA_NR_IRQS + VARIANT_NR_IRQS + PLATFORM_NR_IRQS + 1)#if VARIANT_NR_IRQS ==0 static inline void variant_init_irq (void ) { }
arch/xtensa/kernel/irq.c +0 -5
@@ -34,11 +34,6 @@ asmlinkage void do_IRQ(int hwirq, struct pt_regs *regs) {int irq =irq_find_mapping (NULL , hwirq); -if (hwirq >=NR_IRQS ) { -printk (KERN_EMERG "%s: cannot handle IRQ %d\n" , - __func__, hwirq); - } -#ifdef CONFIG_DEBUG_STACKOVERFLOW /* Debugging check for stack overflow: is there less than 1KB free? */ {
drivers/irqchip/irq-xtensa-mx.c +1 -1
@@ -142,7 +142,7 @@ static struct irq_chip xtensa_mx_irq_chip = {int __init xtensa_mx_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_mx_irq_domain_ops, &xtensa_mx_irq_chip);irq_set_default_host (root_domain);
drivers/irqchip/irq-xtensa-pic.c +1 -1
@@ -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 ;
Signature · 1 line
2.1.4