mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
powerpc: implement __clear_cache
Merge LLVM commit 81f5c6270cdfcdf80e6296df216b696a7a37c8b5. This fixes runtime of most notably pcre libraries (currently patched in ports), and probably also other ports since currently __clear_cache() just calls SIGABRT on powerpc. Reviewed by: dim Differential Revision: https://reviews.freebsd.org/D34736 Approved by: re (gjb) (cherry picked from commit57b6ac48a9) (cherry picked from commit16c3f5d03e)
This commit is contained in:
parent
ce528519ec
commit
f17fa892de
1 changed files with 4 additions and 1 deletions
|
|
@ -130,7 +130,10 @@ void __clear_cache(void *start, void *end) {
|
|||
__asm __volatile("dsb ish");
|
||||
}
|
||||
__asm __volatile("isb sy");
|
||||
#elif defined(__powerpc64__)
|
||||
#elif defined(__powerpc__)
|
||||
// Newer CPUs have a bigger line size made of multiple blocks, so the
|
||||
// following value is a minimal common denominator for what used to be
|
||||
// a single block cache line and is therefore inneficient.
|
||||
const size_t line_size = 32;
|
||||
const size_t len = (uintptr_t)end - (uintptr_t)start;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue