[PATCH RFC] serial: mctrl_gpio: disable IRQs without waiting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



mctrl_gpio_disable_ms() calls disable_irq() to disable the IRQs for the
GPIO lines. The atmel_serial driver calls this function in atomic
context, causing a kernel BUG if CONFIG_DEBUG_ATOMIC_SLEEP is enabled.

This patch uses disable_irq_nosync() instead to avoid waiting for
completion of pending IRQ handlers. The only other driver that uses
mctrl_gpio_disable_ms(), serial/imx.c, may have to be changed to call
this function with IRQs disabled, too. Another option would be to change
the atmel_serial driver to call the function outside of the atomic
context.

Signed-off-by: Ingo van Lil <inguin@xxxxxx>
---
 drivers/tty/serial/serial_mctrl_gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/serial_mctrl_gpio.c b/drivers/tty/serial/serial_mctrl_gpio.c
index 226ad23..0dafc7c 100644
--- a/drivers/tty/serial/serial_mctrl_gpio.c
+++ b/drivers/tty/serial/serial_mctrl_gpio.c
@@ -245,7 +245,7 @@ void mctrl_gpio_disable_ms(struct mctrl_gpios *gpios)
 		if (!gpios->irq[i])
 			continue;
 
-		disable_irq(gpios->irq[i]);
+		disable_irq_nosync(gpios->irq[i]);
 	}
 }
 EXPORT_SYMBOL_GPL(mctrl_gpio_disable_ms);
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux