From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Francesco Dolcini" <francesco.dolcini@toradex.com>,
"Jiri Slaby" <jirislaby@kernel.org>,
"Shawn Guo" <shawnguo@kernel.org>,
"Sascha Hauer" <s.hauer@pengutronix.de>,
"Pengutronix Kernel Team" <kernel@pengutronix.de>,
"Fabio Estevam" <festevam@gmail.com>,
"NXP Linux Team" <linux-imx@nxp.com>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Stefan Agner" <stefan@agner.ch>,
"open list:SERIAL DRIVERS" <linux-serial@vger.kernel.org>,
"linux-arm Mailing List" <linux-arm-kernel@lists.infradead.org>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Subject: Re: [PATCH v2 1/2] serial: imx: fix detach/attach of serial console
Date: Thu, 21 Oct 2021 10:28:35 +0200 [thread overview]
Message-ID: <YXEks5JJ8Eg9wZob@kroah.com> (raw)
In-Reply-To: <CAHp75VdieUOthjX9N89W-boPNk7PrQuTuxM_xmqpo2yv07oZZA@mail.gmail.com>
On Wed, Oct 20, 2021 at 10:54:26PM +0300, Andy Shevchenko wrote:
> On Wed, Oct 20, 2021 at 10:27 PM Francesco Dolcini
> <francesco.dolcini@toradex.com> wrote:
> >
> > From: Stefan Agner <stefan@agner.ch>
> >
> > If the device used as a serial console gets detached/attached at runtime,
> > register_console() will try to call imx_uart_setup_console(), but this
> > is not possible since it is marked as __init.
>
> Thank you for fixing this!
>
> > For instance
> >
> > # cat /sys/devices/virtual/tty/console/active
> > tty1 ttymxc0
> > # echo -n N > /sys/devices/virtual/tty/console/subsystem/ttymxc0/console
> > # echo -n Y > /sys/devices/virtual/tty/console/subsystem/ttymxc0/console
>
> Can we leave only something like below in the commit message?
>
> > [ 73.167005] Unable to handle kernel paging request at virtual address c154d928
> > [ 73.168304] Internal error: Oops: 8000000d [#1] SMP ARM
> > [ 73.168522] CPU: 0 PID: 536 Comm: sh Not tainted 5.15.0-rc6-00056-g3968ddcf05fb #3
> ...
> > [ 73.168791] PC is at imx_uart_console_setup+0x0/0x238
> > [ 73.168927] LR is at try_enable_new_console+0x98/0x124
> ...
> > [ 73.173826] [<c0196f44>] (try_enable_new_console) from [<c01984a8>] (register_console+0x10c/0x2ec)
> > [ 73.174053] [<c01984a8>] (register_console) from [<c06e2c90>] (console_store+0x14c/0x168)
> > [ 73.174262] [<c06e2c90>] (console_store) from [<c0383718>] (kernfs_fop_write_iter+0x110/0x1cc)
>
> > A similar issue could be triggered unbinding/binding the serial console
>
> on unbinding/binding
>
> > device [*].
> >
> > Drop __init so that imx_uart_setup_console() can be safely called at
> > runtime.
> >
> > [*] https://lore.kernel.org/all/20181114174940.7865-3-stefan@agner.ch/
>
> Make it Link: tag?
>
> > Fixes: a3cb39d258ef ("serial: core: Allow detach and attach serial device for console")
> > Signed-off-by: Stefan Agner <stefan@agner.ch>
> > Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
>
> With above nit-picks addressed, FWIW,
Those are not a big deal, I'll edit the changelog text...
thanks,
greg k-h
next prev parent reply other threads:[~2021-10-21 8:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-20 19:26 [PATCH v2 0/2] serial: imx: fix unregister/register console Francesco Dolcini
2021-10-20 19:26 ` [PATCH v2 1/2] serial: imx: fix detach/attach of serial console Francesco Dolcini
2021-10-20 19:39 ` Uwe Kleine-König
2021-10-20 19:54 ` Andy Shevchenko
2021-10-21 8:28 ` Greg Kroah-Hartman [this message]
2021-10-20 19:26 ` [PATCH v2 2/2] serial: imx: disable console clocks on unregister Francesco Dolcini
2021-10-21 8:39 ` Uwe Kleine-König
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=YXEks5JJ8Eg9wZob@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=festevam@gmail.com \
--cc=francesco.dolcini@toradex.com \
--cc=jirislaby@kernel.org \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=stefan@agner.ch \
--cc=u.kleine-koenig@pengutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®