From: Paul Walmsley <pjw@kernel.org>
To: Vivian Wang <wangruikang@iscas.ac.cn>
Cc: "Paul Walmsley" <pjw@kernel.org>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Albert Ou" <aou@eecs.berkeley.edu>,
"Alexandre Ghiti" <alex@ghiti.fr>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Mike Rapoport (Microsoft)" <rppt@kernel.org>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Subject: Re: [PATCH] riscv: patch: Avoid early page_to_phys()
Date: Wed, 18 Mar 2026 11:42:18 -0600 (MDT) [thread overview]
Message-ID: <6ec5d4d4-f171-d41b-2705-a051bcb794e9@kernel.org> (raw)
In-Reply-To: <20260310-riscv-sparsemem-alternatives-fix-v1-1-659d5dd257e2@iscas.ac.cn>
[-- Attachment #1: Type: text/plain, Size: 943 bytes --]
On Tue, 10 Mar 2026, Vivian Wang wrote:
> Similarly to commit 8d09e2d569f6 ("arm64: patching: avoid early
> page_to_phys()"), avoid using phys_to_page() for the kernel address case
> in patch_map().
>
> Since this is called from apply_boot_alternatives() in setup_arch(), and
> commit 4267739cabb8 ("arch, mm: consolidate initialization of SPARSE
> memory model") has moved sparse_init() to after setup_arch(),
> phys_to_page() is not available there yet, and it panics on boot with
> SPARSEMEM on RV32, which does not use SPARSEMEM_VMEMMAP.
>
> Reported-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> Closes: https://lore.kernel.org/r/20260223144108-dcace0b9-02e8-4b67-a7ce-f263bed36f26@linutronix.de/
> Fixes: 4267739cabb8 ("arch, mm: consolidate initialization of SPARSE memory model")
> Suggested-by: Mike Rapoport <rppt@kernel.org>
> Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
Thanks, queued for v7.0-rc.
- Paul
[-- Attachment #2: Type: text/plain, Size: 161 bytes --]
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2026-03-18 17:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-10 8:25 [PATCH] riscv: patch: Avoid early page_to_phys() Vivian Wang
2026-03-10 9:05 ` Thomas Weißschuh
2026-03-10 10:16 ` Mike Rapoport
2026-03-18 17:42 ` Paul Walmsley [this message]
2026-03-23 1:58 ` Vivian Wang
2026-03-23 16:34 ` Andrew Morton
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=6ec5d4d4-f171-d41b-2705-a051bcb794e9@kernel.org \
--to=pjw@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=rppt@kernel.org \
--cc=thomas.weissschuh@linutronix.de \
--cc=wangruikang@iscas.ac.cn \
/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