Skip to content

riscv: fix debug_pagealloc

Nam Cao linux-riscv lkml stable 1 version Applied

Status from this message: This series was applied to riscv/linux.git (for-next)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesApplied 2/2

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2riscv: force PAGE_SIZE linear mapping if debug_pagealloc is enabledarch/riscv/mm/init.c+3 -01 replyApplied
2/2riscv: rewrite __kernel_map_pages() to fix sleeping in invalid contextarch/riscv/mm/pageattr.c+22 -61 replyApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchAlexandre Ghiti
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] riscv: fix debug_pagealloc

The debug_pagealloc feature is not functional on RISCV. With this feature enabled (CONFIG_DEBUG_PAGEALLOC=y and debug_pagealloc=on), kernel crashes early during boot.

QEMU command that can reproduce this problem:
qemu-system-riscv64 -machine virt \
-kernel Image \
-append "console=ttyS0 root=/dev/vda debug_pagealloc=on" \
-nographic \
-drive "file=root.img,format=raw,id=hd0" \
-device virtio-blk-device,drive=hd0 \
-m 4G \

This series makes debug_pagealloc functional.

Nam Cao (2):
riscv: force PAGE_SIZE linear mapping if debug_pagealloc is enabled
riscv: rewrite __kernel_map_pages() to fix sleeping in invalid context

 arch/riscv/mm/init.c     |  3 +++
 arch/riscv/mm/pageattr.c | 28 ++++++++++++++++++++++------
 2 files changed, 25 insertions(+), 6 deletions(-)
Signature · 1 line
2.39.2