The "why?" isn't clearly described.
On 16/4/25 10:14, Kohei Tokunaga wrote:
> Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
> ---
> include/qemu/cacheflush.h | 3 ++-
> util/cacheflush.c | 3 ++-
> 2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/include/qemu/cacheflush.h b/include/qemu/cacheflush.h
> index ae20bcda73..84969801e3 100644
> --- a/include/qemu/cacheflush.h
> +++ b/include/qemu/cacheflush.h
> @@ -19,7 +19,8 @@
> * mappings of the same physical page(s).
> */
>
> -#if defined(__i386__) || defined(__x86_64__) || defined(__s390__)
> +#if defined(__i386__) || defined(__x86_64__) || defined(__s390__) \
> + || defined(EMSCRIPTEN)
>
> static inline void flush_idcache_range(uintptr_t rx, uintptr_t rw, size_t len)
> {
> diff --git a/util/cacheflush.c b/util/cacheflush.c
> index 1d12899a39..e5aa256cd8 100644
> --- a/util/cacheflush.c
> +++ b/util/cacheflush.c
> @@ -225,7 +225,8 @@ static void __attribute__((constructor)) init_cache_info(void)
> * Architecture (+ OS) specific cache flushing mechanisms.
> */
>
> -#if defined(__i386__) || defined(__x86_64__) || defined(__s390__)
> +#if defined(__i386__) || defined(__x86_64__) || defined(__s390__) || \
> + defined(EMSCRIPTEN)
>
> /* Caches are coherent and do not require flushing; symbol inline. */
>