[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250703161742.GF1039028@e132581.arm.com>
Date: Thu, 3 Jul 2025 17:17:42 +0100
From: Leo Yan <leo.yan@....com>
To: Breno Leitao <leitao@...ian.org>
Cc: cov@...eaurora.org, rmk+kernel@...linux.org.uk, mark.rutland@....com,
catalin.marinas@....com, linux-serial@...r.kernel.org,
rmikey@...a.com, linux-arm-kernel@...ts.infradead.org,
usamaarif642@...il.com, linux-kernel@...r.kernel.org,
paulmck@...nel.org
Subject: Re: arm64: csdlock at early boot due to slow serial (?)
Hi Breno,
On Thu, Jul 03, 2025 at 04:01:54PM +0100, Breno Leitao wrote:
[...]
> That is an interesting experiment, thanks for the heads-up.
>
> I got `earlycon=pl011,mmio32,0xc280000` working, the machine boots fine,
> and I see different behaviours.
>
> Booting up the system the following lines (as examples):
>
> [ 0.000000] earlycon: pl11 at MMIO32 0x000000000c280000 (options '115200')
> [ 0.000000] printk: legacy bootconsole [pl11] enabled
> [ 0.493205] smp: Brought up 1 node, 72 CPUs
> [ 4.232864] SMP: Total of 72 processors activated.
> [ 4.242788] CPU: All CPU(s) started at EL2
> [ 6.318137] ARMH0011:00: ttyAMA0 at MMIO 0xc280000 (irq = 66, base_baud = 0) is a SBSA
> [ 6.978245] netpoll: netconsole: local port 6666
> [ 7.234429] Run /init as init process
>
> Also, I have a trace_printk() in pl011_console_write_atomic, and it only
> start later in the code. More precisely at:
>
> swapper/0-1 [000] dN.1. 6.334581: pl011_console_write_atomic: Printing 49 [ 6.334573] printk: console [ttyAMA0] enabled
>
> I understand that the early boot messages got sent by some other
> function? (Or maybe the tracing framework was not initialized?)
>
> Anyway, pl011_console_write_atomic() continues to call ~20K times cpu_relax()
> waiting for the BUSY bit to disappear, as before.
If earlycon works correctly, it means the UART clock has been prepared
before the kernel boots.
I noticed that pl011_console_write_atomic() enables and disables the
uap->clk clock dynamically. The clock is a SoC implementation. If the
UART clock is already properly enabled for earlycon, we can assume it
doesn't need to be managed again in the UART driver.
So, perhaps it's worth an experiment by commenting out the clock
operations in the UART driver?
Thanks,
Leo
Powered by blists - more mailing lists