diff options
| author | Vivian Wang <wangruikang@iscas.ac.cn> | 2026-03-23 17:43:47 -0600 |
|---|---|---|
| committer | Paul Walmsley <pjw@kernel.org> | 2026-04-04 18:37:03 -0600 |
| commit | 6b60a128c2f43180664a614830f3c529497e0394 (patch) | |
| tree | 5f5419dd65397cab89fec2229c6d4528b1b5ed39 /include/asm-powerpc/git@git.tavy.me:linux.git | |
| parent | 834911eb8eef2501485d819b4eabebadc25c3497 (diff) | |
riscv: patch: Avoid early phys_to_page()
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>
Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Tested-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Link: https://patch.msgid.link/20260310-riscv-sparsemem-alternatives-fix-v1-1-659d5dd257e2@iscas.ac.cn
[pjw@kernel.org: fix the subject line to align with the patch description]
Signed-off-by: Paul Walmsley <pjw@kernel.org>
Diffstat (limited to 'include/asm-powerpc/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
