summaryrefslogtreecommitdiffstats
path: root/libpixelflinger/codeflinger/CodeCache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libpixelflinger/codeflinger/CodeCache.cpp')
-rw-r--r--libpixelflinger/codeflinger/CodeCache.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/libpixelflinger/codeflinger/CodeCache.cpp b/libpixelflinger/codeflinger/CodeCache.cpp
index 60fc771..7688290 100644
--- a/libpixelflinger/codeflinger/CodeCache.cpp
+++ b/libpixelflinger/codeflinger/CodeCache.cpp
@@ -39,6 +39,12 @@ namespace android {
#include <errno.h>
#endif
+#if defined(__mips__)
+#include <asm/cachectl.h>
+#include <errno.h>
+#endif
+
+// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// A dlmalloc mspace is used to manage the code cache over a mmaped region.
@@ -200,12 +206,12 @@ int CodeCache::cache( const AssemblyKeyBase& keyBase,
mCacheInUse += assemblySize;
mWhen++;
// synchronize caches...
-#if defined(__arm__)
+#if defined(__arm__) || defined(__mips__)
const long base = long(assembly->base());
const long curr = base + long(assembly->size());
err = cacheflush(base, curr, 0);
- ALOGE_IF(err, "__ARM_NR_cacheflush error %s\n",
- strerror(errno));
+ ALOGE_IF(err, "cacheflush error %s\n",
+ strerror(errno));
#endif
}