Perform I-Cache Maintenance on RISC-V (#5698)

* re modify this.

* fix compile failure.

* fix unused warning.
This commit is contained in:
yuyang
2023-02-03 08:11:24 +08:00
committed by GitHub
parent 426c49b8e3
commit fd67ccf9cd
2 changed files with 50 additions and 1 deletions

View File

@@ -21,3 +21,11 @@ features = [
[target.'cfg(any(target_os = "linux", target_os = "macos", target_os = "freebsd", target_os = "android"))'.dependencies]
libc = "0.2.42"
[features]
# Most modern CPUs are SMP (multicore). However, when only one core is present,
# some aspects of coherence are much cheaper. For example, RISC-V can use
# one instruction `fence.i` rather than a syscall that invokes all other cores.
# This feature enables such optimizations, but the resulting program will *only*
# be safe to run on one-core systems.
one-core = []