mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-21 14:37:50 +00:00
base-hw: optimize cache maintainance for ARMv8
* Remove the data-synchronization barrier from the inner-loop * Instead add a system-wide barrier at the end of the operation Fix #4269
This commit is contained in:
parent
9542bcf88c
commit
6789b86871
@ -121,12 +121,12 @@ void Genode::Cpu::cache_clean_invalidate_data_region(addr_t const base,
|
||||
Genode::memory_barrier();
|
||||
|
||||
auto lambda = [] (addr_t const base) {
|
||||
asm volatile("dc civac, %0" :: "r" (base));
|
||||
asm volatile("dsb ish");
|
||||
asm volatile("isb");
|
||||
};
|
||||
asm volatile("dc civac, %0" :: "r" (base)); };
|
||||
|
||||
cache_maintainance(base, size, lambda);
|
||||
|
||||
asm volatile("dsb sy");
|
||||
asm volatile("isb");
|
||||
}
|
||||
|
||||
|
||||
@ -136,12 +136,12 @@ void Genode::Cpu::cache_invalidate_data_region(addr_t const base,
|
||||
Genode::memory_barrier();
|
||||
|
||||
auto lambda = [] (addr_t const base) {
|
||||
asm volatile("dc ivac, %0" :: "r" (base));
|
||||
asm volatile("dsb ish");
|
||||
asm volatile("isb");
|
||||
};
|
||||
asm volatile("dc ivac, %0" :: "r" (base)); };
|
||||
|
||||
cache_maintainance(base, size, lambda);
|
||||
|
||||
asm volatile("dsb sy");
|
||||
asm volatile("isb");
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user