All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yao Zi <ziyao@disroot.org>
To: Huacai Chen <chenhuacai@kernel.org>,
	Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: Huacai Chen <chenhuacai@loongson.cn>,
	Arnd Bergmann <arnd@arndb.de>,
	f@disroot.org, loongarch@lists.linux.dev,
	linux-arch@vger.kernel.org, Xuefeng Li <lixuefeng@loongson.cn>,
	Guo Ren <guoren@kernel.org>, Xuerui Wang <kernel@xen0n.name>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2 04/14] LoongArch: Adjust boot & setup for 32BIT/64BIT
Date: Wed, 19 Nov 2025 14:28:41 +0000	[thread overview]
Message-ID: <aR3UGUlqGFvo5aX5@pie> (raw)
In-Reply-To: <CAAhV-H6aM+nsK39iTDw1Fec25C7+D2UTh92X6FPf3gDouuyejQ@mail.gmail.com>

On Wed, Nov 19, 2025 at 03:51:01PM +0800, Huacai Chen wrote:
> On Wed, Nov 19, 2025 at 2:03 PM Jiaxun Yang <jiaxun.yang@flygoat.com> wrote:
> >
> >
> >
> > On Wed, 19 Nov 2025, at 12:28 PM, Huacai Chen wrote:
> > [...]
> > >> Per the schema for LoongArch CPUs (loongarch/cpus.yaml), "clocks"
> > >> property is also described as mandantory, thus I don't think such
> > >> fallback makes sense.
> > > Yes, "clocks" is mandatory in theory, but sometimes is missing in
> > > practice, at least in QEMU. On the other hand, if "clocks" really
> > > always exist, then the error checking in fdt_cpu_clk_init() can also
> > > be removed. So the fallback makes sense.
> >
> > IMHO this should be fixed on QEMU side, but I recall QEMU do have clock
> > supplied in generic fdt?
> It is difficult to fix, you can have a try. :)
> If without fallback, cpuinfo shows 0MHz now.

A fake "200MHz" output sounds much worse than obviously wrong "0MHz":
the latter informs the user something bad happened here, while a
mysterious "200MHz" output only makes it more confusing since no one has
specified so in the failing case.

> >
> > >
> > > Why pick 200MHz? That is because we assume the constant timer is
> > > 100MHz (which is true for all real machines), 200MHz is the minimal
> > > multiple of 100MHz, it is more reasonable than 0MHz.
> >
> > Maybe better panic here :-)
> No, this is not a fatal error, we don't need to treat everything as
> fatal. As you know, many "BUG_ON" have been replaced with "WARN_ON" in
> kernel.

But it is an error and shouldn't be ignored. I agree that panic is too
serious for this, but at least a warning should be issued.

> Huacai

Regards,
Yao Zi


> >
> > Thanks
> > --
> > - Jiaxun
> >

  reply	other threads:[~2025-11-19 14:29 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-18 11:27 [PATCH V2 00/14] LoongArch: Add basic LoongArch32 support Huacai Chen
2025-11-18 11:27 ` [PATCH V2 01/14] LoongArch: Add atomic operations for 32BIT/64BIT Huacai Chen
2025-11-18 11:27 ` [PATCH V2 02/14] LoongArch: Add adaptive CSR accessors " Huacai Chen
2025-11-18 11:27 ` [PATCH V2 03/14] LoongArch: Adjust common macro definitions " Huacai Chen
2025-11-18 11:27 ` [PATCH V2 04/14] LoongArch: Adjust boot & setup " Huacai Chen
2025-11-18 17:09   ` Yao Zi
2025-11-19  4:28     ` Huacai Chen
2025-11-19  6:03       ` Jiaxun Yang
2025-11-19  7:51         ` Huacai Chen
2025-11-19 14:28           ` Yao Zi [this message]
2025-11-19 14:43             ` Huacai Chen
2025-11-18 11:27 ` [PATCH V2 05/14] LoongArch: Adjust memory management " Huacai Chen
2025-11-18 11:27 ` [PATCH V2 06/14] LoongArch: Adjust process " Huacai Chen
2025-11-18 11:27 ` [PATCH V2 07/14] LoongArch: Adjust time routines " Huacai Chen
2025-11-18 11:27 ` [PATCH V2 08/14] LoongArch: Adjust module loader " Huacai Chen
2025-11-18 11:27 ` [PATCH V2 09/14] LoongArch: Adjust system call " Huacai Chen
2025-11-20 10:40   ` WANG Xuerui
2025-11-20 12:05     ` Huacai Chen
2025-11-18 11:27 ` [PATCH V2 10/14] LoongArch: Adjust user accessors " Huacai Chen
2025-11-18 11:27 ` [PATCH V2 11/14] LoongArch: Adjust misc routines " Huacai Chen
2025-11-20 10:45   ` WANG Xuerui
2025-11-20 12:04     ` Huacai Chen
2025-11-18 11:27 ` [PATCH V2 12/14] LoongArch: Adjust VDSO/VSYSCALL " Huacai Chen
2025-11-18 13:41   ` Arnd Bergmann
2025-11-18 14:34     ` Huacai Chen
2025-11-18 11:27 ` [PATCH V2 13/14] LoongArch: Adjust default config files " Huacai Chen
2025-11-18 13:45   ` Arnd Bergmann
2025-11-19  8:01     ` Huacai Chen
2025-11-19  8:13       ` Arnd Bergmann
2025-11-19 14:13         ` Huacai Chen
2025-11-20  8:11   ` Thomas Weißschuh
2025-11-20  8:16     ` Huacai Chen
2025-11-20  8:26       ` Thomas Weißschuh
2025-11-20  8:54         ` Huacai Chen
2025-11-18 11:27 ` [PATCH V2 14/14] LoongArch: Adjust build infrastructure " Huacai Chen
2025-11-18 14:07 ` [PATCH V2 00/14] LoongArch: Add basic LoongArch32 support Arnd Bergmann
2025-11-18 14:30   ` Huacai Chen

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=aR3UGUlqGFvo5aX5@pie \
    --to=ziyao@disroot.org \
    --cc=arnd@arndb.de \
    --cc=chenhuacai@kernel.org \
    --cc=chenhuacai@loongson.cn \
    --cc=f@disroot.org \
    --cc=guoren@kernel.org \
    --cc=jiaxun.yang@flygoat.com \
    --cc=kernel@xen0n.name \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lixuefeng@loongson.cn \
    --cc=loongarch@lists.linux.dev \
    /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.