Skip to content

[PW_SID:1128796] riscv/mm: use physical alignment for vmemmap_start_pfn#2300

Open
linux-riscv-bot wants to merge 2 commits into
workflow__riscv__fixesfrom
pw1128796
Open

[PW_SID:1128796] riscv/mm: use physical alignment for vmemmap_start_pfn#2300
linux-riscv-bot wants to merge 2 commits into
workflow__riscv__fixesfrom
pw1128796

Conversation

@linux-riscv-bot

Copy link
Copy Markdown

PR for series 1128796 applied to workflow__riscv__fixes

Name: riscv/mm: use physical alignment for vmemmap_start_pfn
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1128796
Version: 1

Linux RISC-V bot and others added 2 commits July 15, 2026 17:25
RISC-V computes vmemmap_start_pfn by rounding phys_ram_base down to
VMEMMAP_ADDR_ALIGN. That alignment must therefore be expressed in the
physical-address domain.

Commit 476849b ("riscv/mm: align vmemmap to maximal folio size")
attempted to account for the maximal folio alignment by feeding
MAX_FOLIO_VMEMMAP_ALIGN directly into VMEMMAP_ADDR_ALIGN. However,
MAX_FOLIO_VMEMMAP_ALIGN is measured in bytes of struct page storage,
whereas VMEMMAP_ADDR_ALIGN is used to align a physical address.

The mask-based compound_info encoding requires pfn_to_page(0) to be
naturally aligned to MAX_FOLIO_VMEMMAP_ALIGN. Commit 9f94db4
("mm/sparse: check memmap alignment for compound_info_has_mask()")
added a check for that requirement and exposed the unit mismatch on
systems such as QEMU virt, where the DRAM base is not aligned to
MAX_FOLIO_NR_PAGES * PAGE_SIZE.

Convert MAX_FOLIO_VMEMMAP_ALIGN to the equivalent physical alignment
before using it in VMEMMAP_ADDR_ALIGN. This keeps the existing
round_down() logic while making the resulting vmemmap base satisfy the
mask-alignment requirement.

Fixes: 476849b ("riscv/mm: align vmemmap to maximal folio size")
Signed-off-by: Jiakai Xu <xujiakai2025@iscas.ac.cn>
Assisted-by: YuanSheng:DeepSeek-V4-Flash
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv/mm: use physical alignment for vmemmap_start_pfn"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 119.53 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv/mm: use physical alignment for vmemmap_start_pfn"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 2039.40 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv/mm: use physical alignment for vmemmap_start_pfn"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1734.94 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv/mm: use physical alignment for vmemmap_start_pfn"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 20.47 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv/mm: use physical alignment for vmemmap_start_pfn"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.86 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv/mm: use physical alignment for vmemmap_start_pfn"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.05 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv/mm: use physical alignment for vmemmap_start_pfn"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 84.42 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv/mm: use physical alignment for vmemmap_start_pfn"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv/mm: use physical alignment for vmemmap_start_pfn"
kdoc
Desc: Detects for kdoc errors
Duration: 0.74 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv/mm: use physical alignment for vmemmap_start_pfn"
module-param
Desc: Detect module_param changes
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv/mm: use physical alignment for vmemmap_start_pfn"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "riscv/mm: use physical alignment for vmemmap_start_pfn"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.27 seconds
Result: PASS

@linux-riscv-bot
linux-riscv-bot force-pushed the workflow__riscv__fixes branch from 8ca72ef to 60e0882 Compare July 19, 2026 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants