File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ pub fn prepare_for_execution(slice: &[u8]) {
1313 {
1414 aarch64:: prepare_for_execution ( )
1515 }
16- #[ cfg( any( target_arch="riscv64" , target_arch="riscv32" ) ) ]
16+ #[ cfg( all ( unix , any( target_arch="riscv64" , target_arch="riscv32" ) ) ) ]
1717 {
1818 riscv:: enforce_ordering_dcache_icache ( slice, true ) ;
1919 }
@@ -165,7 +165,7 @@ mod aarch64 {
165165 }
166166}
167167
168- #[ cfg( any( target_arch="riscv64" , target_arch="riscv32" ) ) ]
168+ #[ cfg( all ( unix , any( target_arch="riscv64" , target_arch="riscv32" ) ) ) ]
169169mod riscv {
170170 // On risc-v, the story about how we synchronize caches is confused.
171171 // The data sheet states that we ought to do the following.
@@ -185,7 +185,6 @@ mod riscv {
185185 // we have.
186186 use std:: ffi:: { c_void, c_long, c_int} ;
187187
188- #[ cfg( unix) ]
189188 extern "C" {
190189 #[ link_name="__riscv_flush_icache" ]
191190 fn riscv_flush_icache ( start : * const c_void , end : * const c_void , flags : c_long ) -> c_int ;
You can’t perform that action at this time.
0 commit comments