Linux on ARM based TI OMAP SoCs
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Tony Lindgren <tony@atomide.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Jiri Slaby" <jirislaby@kernel.org>,
	"Andy Shevchenko" <andriy.shevchenko@intel.com>,
	"Dhruva Gole" <d-gole@ti.com>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"John Ogness" <john.ogness@linutronix.de>,
	"Johan Hovold" <johan@kernel.org>,
	"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
	"Vignesh Raghavendra" <vigneshr@ti.com>,
	linux-omap@vger.kernel.org,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org
Subject: Re: [PATCH v12 1/1] serial: core: Start managing serial controllers to enable runtime PM
Date: Thu, 1 Jun 2023 16:16:16 +0200	[thread overview]
Message-ID: <ada0d2f8-cb62-1ce7-99c8-c39f071a476d@samsung.com> (raw)
In-Reply-To: <20230601132012.GB14287@atomide.com>

On 01.06.2023 15:20, Tony Lindgren wrote:
> * Tony Lindgren <tony@atomide.com> [230601 11:12]:
>> * Marek Szyprowski <m.szyprowski@samsung.com> [230601 11:00]:
>>> This patch landed in today's linux next-20230601 as commit 84a9582fd203
>>> ("serial: core: Start managing serial controllers to enable runtime
>>> PM"). Unfortunately it breaks booting some of my test boards. This can
>>> be easily reproduced with QEMU and ARM64 virt machine. The last message
>>> I see in the log is:
>>>
>>> [    3.084743] Run /sbin/init as init process
>> OK thanks for the report. I wonder if this issue is specific to ttyAM
>> serial port devices somehow?
> Looks like the problem happens with serial port drivers that use
> arch_initcall():
>
> $ git grep arch_initcall drivers/tty/serial/
> drivers/tty/serial/amba-pl011.c:arch_initcall(pl011_init);
> drivers/tty/serial/mps2-uart.c:arch_initcall(mps2_uart_init);
> drivers/tty/serial/mvebu-uart.c:arch_initcall(mvebu_uart_init);
> drivers/tty/serial/pic32_uart.c:arch_initcall(pic32_uart_init);
> drivers/tty/serial/serial_base_bus.c:arch_initcall(serial_base_init);
> drivers/tty/serial/xilinx_uartps.c:arch_initcall(cdns_uart_init);
>
> We have serial_base_bus use module_init() so the serial core controller
> and port device associated with the physical serial port are not probed.
>
> The patch below should fix the problem you're seeing, care to test and
> if it works I'll post a proper fix?

Right, this fixes my issue. Feel free to add:

Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>

Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>


> Note that if we ever have cases where uart_add_one_port() gets called
> even earlier, we should just call serial_base_init() directly when
> adding the first port.
>
> Regards,
>
> Tony
>
> 8< ------------------
> diff --git a/drivers/tty/serial/serial_base_bus.c b/drivers/tty/serial/serial_base_bus.c
> --- a/drivers/tty/serial/serial_base_bus.c
> +++ b/drivers/tty/serial/serial_base_bus.c
> @@ -186,7 +186,7 @@ static int serial_base_init(void)
>   
>   	return ret;
>   }
> -module_init(serial_base_init);
> +arch_initcall(serial_base_init);
>   
>   static void serial_base_exit(void)
>   {

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


  reply	other threads:[~2023-06-01 14:17 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20230601110030eucas1p2eed547c326a51a6110100fb50799d136@eucas1p2.samsung.com>
2023-05-25 11:30 ` [PATCH v12 1/1] serial: core: Start managing serial controllers to enable runtime PM Tony Lindgren
2023-05-27  8:25   ` Andy Shevchenko
2023-05-30 14:43   ` Greg Kroah-Hartman
2023-06-01 10:04   ` Steven Price
2023-06-01 10:44     ` Tony Lindgren
2023-06-01 10:53       ` Steven Price
2023-06-01 10:57         ` Tony Lindgren
2023-06-01 11:00   ` Marek Szyprowski
2023-06-01 11:11     ` Tony Lindgren
2023-06-01 13:20       ` Tony Lindgren
2023-06-01 14:16         ` Marek Szyprowski [this message]
2023-06-01 14:20           ` Tony Lindgren
2023-06-02  8:33   ` Chen-Yu Tsai
2023-06-02  9:27     ` Tony Lindgren
2023-06-02 10:13     ` John Ogness
2023-06-03  5:41       ` Tony Lindgren
2023-06-03  6:35         ` Tony Lindgren
2023-06-05  6:15           ` Tony Lindgren
2023-06-05 11:28             ` Andy Shevchenko
2023-06-05 12:25               ` Tony Lindgren
2023-06-05 11:34             ` Chen-Yu Tsai
2023-06-05 12:24               ` Tony Lindgren
2023-06-05 13:01                 ` Chen-Yu Tsai
2023-06-05 13:18                   ` Tony Lindgren
2023-06-06  9:16                     ` Chen-Yu Tsai
2023-06-06 12:20                       ` Tony Lindgren
2023-06-07  4:46                         ` Chen-Yu Tsai
2023-06-07  7:17                           ` AngeloGioacchino Del Regno
2023-06-07 20:20                           ` Andy Shevchenko
2023-06-03 21:57         ` Sebastian Reichel
2023-06-04  6:04           ` Tony Lindgren
2023-06-05  3:04       ` Chen-Yu Tsai
2023-10-03 11:57   ` Maximilian Luz
2023-10-03 12:14     ` Tony Lindgren
2023-10-03 12:21       ` Tony Lindgren
2023-10-03 22:09         ` Maximilian Luz
2023-10-04  6:17           ` Tony Lindgren
2023-10-04  7:14             ` Johan Hovold
2023-10-04  9:03               ` Tony Lindgren
2023-10-04  9:14                 ` Johan Hovold
2023-10-04 10:01                   ` Tony Lindgren
2023-10-04 18:44                     ` Maximilian Luz
2023-10-04  7:39             ` Maximilian Luz

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=ada0d2f8-cb62-1ce7-99c8-c39f071a476d@samsung.com \
    --to=m.szyprowski@samsung.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bigeasy@linutronix.de \
    --cc=d-gole@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=jirislaby@kernel.org \
    --cc=johan@kernel.org \
    --cc=john.ogness@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=tony@atomide.com \
    --cc=vigneshr@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox