Commit 49e6e07e authored by afzal mohammed's avatar afzal mohammed Committed by Thomas Bogendoerfer
Browse files

MIPS: pass non-NULL dev_id on shared request_irq()



Recently all usages of setup_irq() was replaced by request_irq().
request_irq() does a few sanity checks that were not done in
setup_irq(), if they fail irq registration will fail. One of the check
is to ensure that non-NULL dev_id is passed in the case of shared irq.
This caused malta on qemu to hang.

Fix it by passing handler as dev_id to all request_irq()'s that are
shared. For sni, instead of passing non-NULL dev_id, remove shared irq
flags.

Fixes: ac8fd122 ("MIPS: Replace setup_irq() by request_irq()")
Reported-by: default avatarNathan Chancellor <natechancellor@gmail.com>
Suggested-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: default avatarafzal mohammed <afzal.mohd.ma@gmail.com>
Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
Tested-by: default avatarNathan Chancellor <natechancellor@gmail.com>
Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
parent ac8fd122
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -758,7 +758,7 @@ void __init arch_init_irq(void)
	/* Register the bus error interrupt. */
	if (dec_interrupt[DEC_IRQ_BUS] >= 0 && busirq_handler) {
		if (request_irq(dec_interrupt[DEC_IRQ_BUS], busirq_handler,
				busirq_flags, "bus error", NULL))
				busirq_flags, "bus error", busirq_handler))
			pr_err("Failed to register bus error interrupt\n");
	}
	/* Register the HALT interrupt. */
+2 −1
Original line number Diff line number Diff line
@@ -292,7 +292,8 @@ int r4k_clockevent_init(void)

	cp0_timer_irq_installed = 1;

	if (request_irq(irq, c0_compare_interrupt, flags, "timer", NULL))
	if (request_irq(irq, c0_compare_interrupt, flags, "timer",
			c0_compare_interrupt))
		pr_err("Failed to request irq %d (timer)\n", irq);

	return 0;
+1 −1
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ void __init mach_init_irq(void)

	/* setup north bridge irq (bonito) */
	if (request_irq(LOONGSON_NORTH_BRIDGE_IRQ, ip6_action,
			IRQF_SHARED | IRQF_NO_THREAD, "cascade", NULL))
			IRQF_SHARED | IRQF_NO_THREAD, "cascade", ip6_action))
		pr_err("Failed to register north bridge cascade interrupt\n");
	/* setup source bridge irq (i8259) */
	if (request_irq(LOONGSON_SOUTH_BRIDGE_IRQ, no_action,
+1 −1
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ unsigned int get_c0_compare_int(void)
	/* MIPS_MT modes may want timer for second VPE */
	if ((get_current_vpe()) && !tim_installed) {
		if (request_irq(MSP_INT_VPE1_TIMER, c0_compare_interrupt, flags,
				"timer", NULL))
				"timer", c0_compare_interrupt))
			pr_err("Failed to register timer interrupt\n");
		tim_installed++;
	}
+2 −2
Original line number Diff line number Diff line
@@ -222,8 +222,8 @@ void __init sni_a20r_irq_init(void)
		irq_set_chip_and_handler(i, &a20r_irq_type, handle_level_irq);
	sni_hwint = a20r_hwint;
	change_c0_status(ST0_IM, IE_IRQ0);
	if (request_irq(SNI_A20R_IRQ_BASE + 3, sni_isa_irq_handler,
			IRQF_SHARED, "ISA", NULL))
	if (request_irq(SNI_A20R_IRQ_BASE + 3, sni_isa_irq_handler, 0, "ISA",
			NULL))
		pr_err("Failed to register ISA interrupt\n");
}

Loading