tty: Remove pointless synchronize_irq() in uart_port_shutdown()
PATCH 1/1 tty: Remove pointless synchronize_irq() in uart_port_shutdown()
From: Thomas Pfaff <[email protected]>
Calling synchronize_irq() after free_irq() is pointless, the context to the irq is already lost.
It was noticed while creating the bugfix "genirq: Synchronize interrupt thread startup".
---
drivers/tty/serial/serial_core.c +0 -6
@@ -1704,12 +1704,6 @@ static void uart_port_shutdown(struct tty_port *port)*/ if (uport) uport->ops->shutdown (uport); - -/* -* Ensure that the IRQ handler isn't running on another CPU. -*/ -if (uport) -synchronize_irq (uport->irq); }static int uart_carrier_raised (struct tty_port *port)
Quoted 8 lines · Thomas Pfaff
From: Thomas Pfaff <[email protected]>
Calling
synchronize_irq()afterfree_irq()is pointless, the context to the irq is already lost.
It was noticed while creating the bugfix "genirq: Synchronize interrupt thread startup".Signed-off-by Thomas Pfaff <[email protected]>
Jiri Slaby
maintainerQuoted 6 lines · Thomas Pfaff
From: Thomas Pfaff <[email protected]>
Calling
synchronize_irq()afterfree_irq()is pointless, the context to the irq is already lost.
It was noticed while creating the bugfix "genirq: Synchronize interrupt thread startup".
That's correct for most drivers. But some drivers don't call free_irq() in ->shutdown(). So you likely have to move the synchronization to them. By a quick grep, I found icom, jsm, sccnxp, sifive, sunhv, and sunzilog.
Quoted 21 lines
Signed-off-by Thomas Pfaff <[email protected]>---
drivers/tty/serial/serial_core.c +0
-6@@ -1704,12 +1704,6 @@ static void uart_port_shutdown(struct tty_port *port)*/ if (uport) uport->ops->shutdown (uport); - -/* -* Ensure that the IRQ handler isn't running on another CPU. -*/ -if (uport) -synchronize_irq (uport->irq); }static int uart_carrier_raised (struct tty_port *port)
Signature · 2 lines
js suse labs
Quoted 12 lines · Jiri Slaby
Quoted 6 lines · Thomas Pfaff
From: Thomas Pfaff <[email protected]>
Calling
synchronize_irq()afterfree_irq()is pointless, the context to the irq is already lost.
It was noticed while creating the bugfix "genirq: Synchronize interrupt thread startup".That's correct for most drivers. But some drivers don't call
free_irq()in ->shutdown(). So you likely have to move the synchronization to them. By a quick grep, I found icom, jsm, sccnxp, sifive, sunhv, and sunzilog.
Sorry, I did not check all the drivers.
Then I would keep it in serial_core, as it does not hurt anymore.
Thanks,
Thomas