Files
qemu-esp-boards/util
Philippe Mathieu-Daudé bb6af0fa51 util/cacheflush: Avoid possible redundant dcache flush on Darwin
<libkern/OSCacheControl.h> describes sys_icache_invalidate() as
"equivalent to sys_cache_control(kCacheFunctionPrepareForExecution)",
having kCacheFunctionPrepareForExecution defined as:

  /* Prepare memory for execution.  This should be called
   * after writing machine instructions to memory, before
   * executing them.  It syncs the dcache and icache. [...]
   */

Since the dcache is also sync'd, we can avoid the sys_dcache_flush()
call when both rx/rw pointers are equal.

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20230605195911.96033-1-philmd@linaro.org>
2023-06-13 11:28:58 +02:00
..
2023-05-30 17:37:26 +02:00
2023-03-20 12:43:50 +01:00
2023-05-23 16:51:18 -07:00
2023-05-23 15:20:15 +08:00
2023-03-20 12:43:50 +01:00
2022-12-20 17:09:41 -08:00
2022-04-21 17:03:51 +04:00
2023-03-08 00:37:48 +01:00
2023-05-23 16:51:18 -07:00
2023-04-24 11:29:00 +02:00
2023-03-13 15:23:37 +04:00
2022-06-29 10:56:12 +03:00
2023-02-02 11:48:20 +00:00
2023-03-28 15:23:10 -07:00
2023-05-08 11:10:49 +02:00
2023-04-27 16:39:43 +02:00