From: guibing <guibing@nucleisys.com>
To: Vivian Wang <wangruikang@iscas.ac.cn>,
linux-riscv <linux-riscv@lists.infradead.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Cc: palmer <palmer@dabbelt.com>, "Paul Walmsley" <pjw@kernel.org>,
"Alexandre Ghiti" <alex@ghiti.fr>, 方华启 <hqfang@nucleisys.com>
Subject: Re: [BUG] riscv: Kernel panic in free_initmem when driver triggers modprobe
Date: Fri, 3 Apr 2026 23:48:23 +0800 [thread overview]
Message-ID: <16CD0FBE02F047CE+d9f92da1-e06f-4d9c-803d-b6929e9b699d@nucleisys.com> (raw)
In-Reply-To: <819bb897-3bce-4c8e-81f0-1f36956cdf2e@iscas.ac.cn>
Hi Vivian,
thank you for your reply,the best_map_size function patch can solve the
panic。
I check it again on v6.6.90 rv32 qemu virt platform, there is no
problem. The problem may come from my gdb va2pa script which directly
read physical memory address on FPGA, i'm not sure "x /x phy_addr" can
work well, I will check it later.
vp1:770
vp0:0
virtual addr:c0800000
satp:80081c94
L1 page base :81c94000
L1 pte:300c0401
L2 page base :c0301000
L2 pte:8595bde9 -->here is error
phy addr:fffffffe1656f000
Thanks.
在 2026/4/3 1:45, Vivian Wang 写道:
> static uintptr_t __init best_map_size(phys_addr_t base, phys_addr_t size)
> {
> + /*
> + * On 32-bit, avoid PGD (i.e. PMD) sized mappings, since we are not
> + * going to propagate PGD level changes.
> + */
> + if (!IS_ENABLED(CONFIG_64BIT))
> + return PAGE_SIZE;
> +
> /* Upgrade to PMD_SIZE mappings whenever possible */
> if ((base & (PMD_SIZE - 1)) || (size & (PMD_SIZE - 1)))
> return PAGE_SIZE;
prev parent reply other threads:[~2026-04-03 15:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-02 11:02 guibing
2026-04-02 17:45 ` Vivian Wang
2026-04-02 18:05 ` Vivian Wang
2026-04-03 15:48 ` guibing [this message]
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=16CD0FBE02F047CE+d9f92da1-e06f-4d9c-803d-b6929e9b699d@nucleisys.com \
--to=guibing@nucleisys.com \
--cc=alex@ghiti.fr \
--cc=hqfang@nucleisys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--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
all inboxes | Powered by JetHome®