Skip to content

Commit c889b85

Browse files
authored
deps: V8: cherry-pick 9ab40592f697
Original commit message: [riscv] Flush icache in both local and remote harts Fix the I-Cache flush flag according to the implementation of flush_icache_mm in Linux kernel. Change-Id: I6e6b1f56c377c2c0a629e170737bfac6c357ce8d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6080611 Commit-Queue: Yahan Lu (LuYahan) <[email protected]> Reviewed-by: Ji Qiu <[email protected]> Cr-Commit-Position: refs/heads/main@{#97673} Refs: v8/v8@9ab4059 PR-URL: #56781 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Debadree Chatterjee <[email protected]> Reviewed-By: Richard Lau <[email protected]>
1 parent c4fb331 commit c889b85

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

common.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
# Reset this number to 0 on major V8 upgrades.
3939
# Increment by one for each non-official patch applied to deps/v8.
40-
'v8_embedder_string': '-node.10',
40+
'v8_embedder_string': '-node.11',
4141

4242
##### V8 defaults for Node.js #####
4343

deps/v8/src/codegen/riscv/cpu-riscv.cc

+2-6
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,12 @@ namespace internal {
1515
void CpuFeatures::FlushICache(void* start, size_t size) {
1616
#if !defined(USE_SIMULATOR)
1717
char* end = reinterpret_cast<char*>(start) + size;
18-
// The definition of this syscall is equal to
19-
// SYSCALL_DEFINE3(riscv_flush_icache, uintptr_t, start,
20-
// uintptr_t, end, uintptr_t, flags)
21-
// The flag here is set to be SYS_RISCV_FLUSH_ICACHE_LOCAL, which is
22-
// defined as 1 in the Linux kernel.
2318
// SYS_riscv_flush_icache is a symbolic constant used in user-space code to
2419
// identify the flush_icache system call, while __NR_riscv_flush_icache is the
2520
// corresponding system call number used in the kernel to dispatch the system
2621
// call.
27-
syscall(__NR_riscv_flush_icache, start, end, 1);
22+
// The flag set to zero will flush all cpu cores.
23+
syscall(__NR_riscv_flush_icache, start, end, 0);
2824
#endif // !USE_SIMULATOR.
2925
}
3026

0 commit comments

Comments
 (0)