syscalls/mprotect04: Use __builtin___clear_cache() to sync caches
In commit cf9a0800cd0 code was added to mprotect04 to synchronize
the instruction and data caches on PowerPC before executing
the copied code. This is also necessary on other architectures
which have split instruction and data caches and need explicit
cache maintenance operations, like ARM.
The GCC builtin __builtin___clear_cache() will correctly handle
this for all architectures, so switch to using it. The builtin
was only implemented at around GCC 4.1, so use a configure
check so that we will skip the test with TCONF if the compiler
doesn't support the builtin.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Jan Stancek <jstancek@redhat.com>
3 files changed