summaryrefslogtreecommitdiff
path: root/firmware/export/system.h
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2021-03-03 17:54:38 +0000
committerSolomon Peachy <pizza@shaftnet.org>2021-03-03 20:50:28 +0000
commit74a3d1f5be2d364a33f37e0ad621538df1bfba4b (patch)
tree8989db6f499d53384645a7a6c6ee84933764f7fd /firmware/export/system.h
parentf906df017dd7e82f8452cc479373a1b341a02bd9 (diff)
downloadrockbox-74a3d1f5be2d364a33f37e0ad621538df1bfba4b.tar.gz
rockbox-74a3d1f5be2d364a33f37e0ad621538df1bfba4b.zip
Fix MIPS cache operations and enable HAVE_CPU_CACHE_ALIGN on MIPS
- The range-based cache operations on MIPS were broken and only worked properly when BOTH the address and size were multiples of the cache line size. If this was not the case, the last cache line of the range would not be touched! Fix is to align start/end pointers to cache lines before iterating. - To my knowledge all MIPS processors have a cache, so I enabled HAVE_CPU_CACHE_ALIGN by default. This also allows mmu-mips.c to use the CACHEALIGN_UP/DOWN macros. - Make jz4760/system-target.h define its cache line size properly. Change-Id: I1fcd04a59791daa233b9699f04d5ac1cc6bacee7
Diffstat (limited to 'firmware/export/system.h')
-rw-r--r--firmware/export/system.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/export/system.h b/firmware/export/system.h
index f9a074349b..f554ac7cf1 100644
--- a/firmware/export/system.h
+++ b/firmware/export/system.h
@@ -253,6 +253,10 @@ static inline void cpu_boost_unlock(void)
253 #define MIN_STACK_ALIGN 8 253 #define MIN_STACK_ALIGN 8
254#endif 254#endif
255 255
256#ifdef CPU_MIPS
257 #define HAVE_CPU_CACHE_ALIGN
258#endif
259
256/* Define this if target has support for generating backtraces */ 260/* Define this if target has support for generating backtraces */
257#ifdef CPU_ARM 261#ifdef CPU_ARM
258 #define HAVE_RB_BACKTRACE 262 #define HAVE_RB_BACKTRACE