Skip to content

[PW_SID:1126321] mm/sparse-vmemmap: flush_cache_vmap() after hotplugging vmemmap#2267

Closed
linux-riscv-bot wants to merge 3 commits into
workflow__riscv__fixesfrom
pw1126321
Closed

[PW_SID:1126321] mm/sparse-vmemmap: flush_cache_vmap() after hotplugging vmemmap#2267
linux-riscv-bot wants to merge 3 commits into
workflow__riscv__fixesfrom
pw1126321

Conversation

@linux-riscv-bot

Copy link
Copy Markdown

PR for series 1126321 applied to workflow__riscv__fixes

Name: mm/sparse-vmemmap: flush_cache_vmap() after hotplugging vmemmap
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1126321
Version: 6

Linux RISC-V bot and others added 3 commits July 11, 2026 01:54
None of the code relating to mark_new_valid_map() does anything useful
without CONFIG_64BIT=y && CONFIG_MMU=y, because the
new_valid_map_cpus_check code is only used if CONFIG_64BIT, and the
exception codes checked there can only happen with CONFIG_MMU=y.

Therefore, make these conditional on CONFIG_64BIT=y && CONFIG_MMU=y to
simplify programming, since we do not have to handle CONFIG_MMU=n when
changing this code in the future. This also removes some unused code on
the entry path for CONFIG_MMU=n.

Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
section_activate() does not flush TLB after populating new vmemmap
pages. On most architectures, this is okay. However it is a problem on
RISC-V since there the TLB caching non-present entries is permitted,
which causes spurious faults on some hardwares.

This seems to be most easily reproduced with DEBUG_VM=y and
PAGE_POISONING=y, which causes these newly mapped struct pages to be
poisoned i.e. written to immediately after mapping.

Extend the RISC-V flush_cache_vmap() to also handle the vmemmap range,
and call it after hotplugging vmemmap, which gets the possible spurious
fault handled in the exception handler.

At least for now, the only other architecture with both
SPARSEMEM_VMEMMAP and flush_cache_vmap() is PowerPC, which has a similar
problem with newly valid PTEs. But there flush_cache_vmap() is just a
ptesync. So it should be safe to do this for generic code while having
minimal performance impact.

Suggested-by: Muchun Song <muchun.song@linux.dev>
Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
Reviewed-by: Muchun Song <muchun.song@linux.dev>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v6,1/2] riscv: mm: Make mark_new_valid_map() stuff depend on 64BIT && MMU"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 121.39 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v6,1/2] riscv: mm: Make mark_new_valid_map() stuff depend on 64BIT && MMU"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1672.91 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v6,1/2] riscv: mm: Make mark_new_valid_map() stuff depend on 64BIT && MMU"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1992.67 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v6,1/2] riscv: mm: Make mark_new_valid_map() stuff depend on 64BIT && MMU"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 20.68 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v6,1/2] riscv: mm: Make mark_new_valid_map() stuff depend on 64BIT && MMU"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 22.13 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v6,1/2] riscv: mm: Make mark_new_valid_map() stuff depend on 64BIT && MMU"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.01 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v6,1/2] riscv: mm: Make mark_new_valid_map() stuff depend on 64BIT && MMU"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 84.80 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v6,1/2] riscv: mm: Make mark_new_valid_map() stuff depend on 64BIT && MMU"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v6,1/2] riscv: mm: Make mark_new_valid_map() stuff depend on 64BIT && MMU"
kdoc
Desc: Detects for kdoc errors
Duration: 0.76 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v6,1/2] riscv: mm: Make mark_new_valid_map() stuff depend on 64BIT && MMU"
module-param
Desc: Detect module_param changes
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v6,1/2] riscv: mm: Make mark_new_valid_map() stuff depend on 64BIT && MMU"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[v6,1/2] riscv: mm: Make mark_new_valid_map() stuff depend on 64BIT && MMU"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.28 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v6,2/2] mm/sparse-vmemmap: flush_cache_vmap() after hotplugging vmemmap"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 120.49 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v6,2/2] mm/sparse-vmemmap: flush_cache_vmap() after hotplugging vmemmap"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 2026.74 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v6,2/2] mm/sparse-vmemmap: flush_cache_vmap() after hotplugging vmemmap"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 2613.14 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v6,2/2] mm/sparse-vmemmap: flush_cache_vmap() after hotplugging vmemmap"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 20.63 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v6,2/2] mm/sparse-vmemmap: flush_cache_vmap() after hotplugging vmemmap"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 22.22 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v6,2/2] mm/sparse-vmemmap: flush_cache_vmap() after hotplugging vmemmap"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.85 seconds
Result: WARNING
Output:

WARNING: A patch subject line should describe the change not the tool that found it
#4: 
Subject: [PATCH] mm/sparse-vmemmap: flush_cache_vmap() after hotplugging

total: 0 errors, 1 warnings, 0 checks, 17 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit 82dd31bf6524 ("mm/sparse-vmemmap: flush_cache_vmap() after hotplugging vmemmap") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 1 warnings, 0 checks, 17 lines checked
WARNING: A patch subject line should describe the change not the tool that found it


@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v6,2/2] mm/sparse-vmemmap: flush_cache_vmap() after hotplugging vmemmap"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 83.96 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v6,2/2] mm/sparse-vmemmap: flush_cache_vmap() after hotplugging vmemmap"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v6,2/2] mm/sparse-vmemmap: flush_cache_vmap() after hotplugging vmemmap"
kdoc
Desc: Detects for kdoc errors
Duration: 0.74 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v6,2/2] mm/sparse-vmemmap: flush_cache_vmap() after hotplugging vmemmap"
module-param
Desc: Detect module_param changes
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v6,2/2] mm/sparse-vmemmap: flush_cache_vmap() after hotplugging vmemmap"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[v6,2/2] mm/sparse-vmemmap: flush_cache_vmap() after hotplugging vmemmap"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
linux-riscv-bot force-pushed the workflow__riscv__fixes branch from da477a6 to 869345e Compare July 13, 2026 18:24
@linux-riscv-bot
linux-riscv-bot deleted the pw1126321 branch July 13, 2026 18:25
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