irqchip fixes for 5.14, take #1
- Fix a MIPS bug where irqdomain loopkups could occur in a context where RCU is not allowed - Fix a documentation bug for handle_domain_irq -----BEGIN PGP SIGNATURE----- iQJDBAABCgAtFiEEn9UcU+C1Yxj9lZw9I9DQutE9ekMFAmDoFZwPHG1hekBrZXJu ZWwub3JnAAoJECPQ0LrRPXpDkxgP/0IlcPoBfamLbzpjyrMm0359AIllKP7Vgpb6 IaDnoiWTCe1B6rFoP59j357iGCTvB04+oJ17DsB51R9RKaM2sdhi2dKxbEHRd+se v1EyU5gmVB7JJP/1lPnjYdPGnXz73jjEq5MRI6o4yLG2xnQ+ZcdHifuP/tD7glGZ UmJkAWrq53IbBCja9HbtbAQanuDtDu6xgYIweaCdf2oKzNS9jQVvjqFokMd0AcIA juY8xTFNzHoA/8AF8eBUE5TfLVcG8j3P31ffw4gVvzEkman77AP5DZ8qkSvi7plH wOdjlBrsGTfoti4kfAIvsfi6zBHyXJEaW0Vd38uaA+cXYI1QNiZ9qqzQPvjuK9gs VFORcWe2pDiI1q4mg1pz7dGBy0FoEswe4uVnr6xm+vn98KeAn/gS5Dc/K1JpmfN+ iOJt9H7hvDrUC/KnntzuRY82I8y7gDyyjGDJHhFlWgZBeONPhpOiE/d6xbxGtQm8 SpVBD9QZnMBxDY2eVNQp31SCdrwLCLczNeQrJHP6Oh9LLmjQq3VD4M3OpBLpEA8e 8WIiH9vJfXI5emU1wQRkscyA8tT2mAo3Kb192fpC5nDwTMSxbfk1l94oLGUldcV5 liQ78yd/12mJBMS5MJPsA39g1ww2vv5m6Bq0JDwDu33l1qKrlRJqveeS8UjDSXrD s3cVrxFO =eTw3 -----END PGP SIGNATURE----- Merge tag 'irqchip-fixes-5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent Pull irqchip fixes from Marc Zyngier: - Fix a MIPS bug where irqdomain loopkups could occur in a context where RCU is not allowed - Fix a documentation bug for handle_domain_irq
This commit is contained in:
commit
4840048356
|
@ -57,6 +57,9 @@ asmlinkage void plat_irq_dispatch(void);
|
|||
|
||||
extern void do_IRQ(unsigned int irq);
|
||||
|
||||
struct irq_domain;
|
||||
extern void do_domain_IRQ(struct irq_domain *domain, unsigned int irq);
|
||||
|
||||
extern void arch_init_irq(void);
|
||||
extern void spurious_interrupt(void);
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include <linux/kallsyms.h>
|
||||
#include <linux/kgdb.h>
|
||||
#include <linux/ftrace.h>
|
||||
#include <linux/irqdomain.h>
|
||||
|
||||
#include <linux/atomic.h>
|
||||
#include <linux/uaccess.h>
|
||||
|
@ -107,3 +108,18 @@ void __irq_entry do_IRQ(unsigned int irq)
|
|||
irq_exit();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IRQ_DOMAIN
|
||||
void __irq_entry do_domain_IRQ(struct irq_domain *domain, unsigned int hwirq)
|
||||
{
|
||||
struct irq_desc *desc;
|
||||
|
||||
irq_enter();
|
||||
check_stack_overflow();
|
||||
|
||||
desc = irq_resolve_mapping(domain, hwirq);
|
||||
if (likely(desc))
|
||||
handle_irq_desc(desc);
|
||||
|
||||
irq_exit();
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -127,7 +127,6 @@ static struct irq_chip mips_mt_cpu_irq_controller = {
|
|||
asmlinkage void __weak plat_irq_dispatch(void)
|
||||
{
|
||||
unsigned long pending = read_c0_cause() & read_c0_status() & ST0_IM;
|
||||
unsigned int virq;
|
||||
int irq;
|
||||
|
||||
if (!pending) {
|
||||
|
@ -137,12 +136,15 @@ asmlinkage void __weak plat_irq_dispatch(void)
|
|||
|
||||
pending >>= CAUSEB_IP;
|
||||
while (pending) {
|
||||
struct irq_domain *d;
|
||||
|
||||
irq = fls(pending) - 1;
|
||||
if (IS_ENABLED(CONFIG_GENERIC_IRQ_IPI) && irq < 2)
|
||||
virq = irq_linear_revmap(ipi_domain, irq);
|
||||
d = ipi_domain;
|
||||
else
|
||||
virq = irq_linear_revmap(irq_domain, irq);
|
||||
do_IRQ(virq);
|
||||
d = irq_domain;
|
||||
|
||||
do_domain_IRQ(d, irq);
|
||||
pending &= ~BIT(irq);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -169,8 +169,8 @@ static void gic_handle_shared_int(bool chained)
|
|||
generic_handle_domain_irq(gic_irq_domain,
|
||||
GIC_SHARED_TO_HWIRQ(intr));
|
||||
else
|
||||
do_IRQ(irq_find_mapping(gic_irq_domain,
|
||||
GIC_SHARED_TO_HWIRQ(intr)));
|
||||
do_domain_IRQ(gic_irq_domain,
|
||||
GIC_SHARED_TO_HWIRQ(intr));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -320,8 +320,8 @@ static void gic_handle_local_int(bool chained)
|
|||
generic_handle_domain_irq(gic_irq_domain,
|
||||
GIC_LOCAL_TO_HWIRQ(intr));
|
||||
else
|
||||
do_IRQ(irq_find_mapping(gic_irq_domain,
|
||||
GIC_LOCAL_TO_HWIRQ(intr)));
|
||||
do_domain_IRQ(gic_irq_domain,
|
||||
GIC_LOCAL_TO_HWIRQ(intr));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -42,11 +42,10 @@ static void __iomem *evic_base;
|
|||
|
||||
asmlinkage void __weak plat_irq_dispatch(void)
|
||||
{
|
||||
unsigned int irq, hwirq;
|
||||
unsigned int hwirq;
|
||||
|
||||
hwirq = readl(evic_base + REG_INTSTAT) & 0xFF;
|
||||
irq = irq_linear_revmap(evic_irq_domain, hwirq);
|
||||
do_IRQ(irq);
|
||||
do_domain_IRQ(evic_irq_domain, hwirq);
|
||||
}
|
||||
|
||||
static struct evic_chip_data *irqd_to_priv(struct irq_data *data)
|
||||
|
|
|
@ -682,7 +682,6 @@ EXPORT_SYMBOL_GPL(generic_handle_domain_irq);
|
|||
* usually for a root interrupt controller
|
||||
* @domain: The domain where to perform the lookup
|
||||
* @hwirq: The HW irq number to convert to a logical one
|
||||
* @lookup: Whether to perform the domain lookup or not
|
||||
* @regs: Register file coming from the low-level handling code
|
||||
*
|
||||
* Returns: 0 on success, or -EINVAL if conversion has failed
|
||||
|
|
Loading…
Reference in New Issue