All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@kernel.org>
To: Thomas Pfaff <tpfaff@pcs.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tty: Remove pointless synchronize_irq() in uart_port_shutdown()
Date: Wed, 11 May 2022 08:21:36 +0200	[thread overview]
Message-ID: <91c006d0-c6ff-71fa-f0c3-22cf1896fc02@kernel.org> (raw)
In-Reply-To: <4fe2d4a1-fc6a-c7fa-d884-5ebd01bebd3@pcs.com>

On 10. 05. 22, 15:54, Thomas Pfaff wrote:
> From: Thomas Pfaff <tpfaff@pcs.com>
> 
> 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".

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.

> Signed-off-by: Thomas Pfaff <tpfaff@pcs.com>
> ---
> diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
> index 57840cf90388..b76e76e650ba 100644
> --- a/drivers/tty/serial/serial_core.c
> +++ b/drivers/tty/serial/serial_core.c
> @@ -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)
> 
> 


-- 
js
suse labs

  parent reply	other threads:[~2022-05-11  6:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-10 13:54 [PATCH] tty: Remove pointless synchronize_irq() in uart_port_shutdown() Thomas Pfaff
2022-05-10 17:44 ` Thomas Gleixner
2022-05-11  6:21 ` Jiri Slaby [this message]
2022-05-11  7:48   ` Thomas Pfaff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=91c006d0-c6ff-71fa-f0c3-22cf1896fc02@kernel.org \
    --to=jirislaby@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tpfaff@pcs.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.