diff options
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/fft/fft.c | 4 | ||||
-rw-r--r-- | apps/plugins/mpegplayer/alloc.c | 2 | ||||
-rw-r--r-- | apps/plugins/mpegplayer/video_thread.c | 8 | ||||
-rw-r--r-- | apps/plugins/plugin_crt0.c | 8 |
4 files changed, 9 insertions, 13 deletions
diff --git a/apps/plugins/fft/fft.c b/apps/plugins/fft/fft.c index 11bdfc8e74..89205503e7 100644 --- a/apps/plugins/fft/fft.c +++ b/apps/plugins/fft/fft.c | |||
@@ -1249,7 +1249,7 @@ static void fft_thread_entry(void) | |||
1249 | } | 1249 | } |
1250 | 1250 | ||
1251 | /* write back output for other processor and invalidate for next frame read */ | 1251 | /* write back output for other processor and invalidate for next frame read */ |
1252 | rb->cpucache_invalidate(); | 1252 | rb->commit_discard_dcache(); |
1253 | 1253 | ||
1254 | int new_tail = output_tail ^ 1; | 1254 | int new_tail = output_tail ^ 1; |
1255 | 1255 | ||
@@ -1311,7 +1311,7 @@ static void fft_close_fft(void) | |||
1311 | /* Handle our FFT thread. */ | 1311 | /* Handle our FFT thread. */ |
1312 | fft_thread_run = false; | 1312 | fft_thread_run = false; |
1313 | rb->thread_wait(fft_thread); | 1313 | rb->thread_wait(fft_thread); |
1314 | rb->cpucache_invalidate(); | 1314 | rb->commit_discard_dcache(); |
1315 | } | 1315 | } |
1316 | #else /* NUM_CORES == 1 */ | 1316 | #else /* NUM_CORES == 1 */ |
1317 | /* everything serialize on single-core and FFT gets to use IRAM main stack if | 1317 | /* everything serialize on single-core and FFT gets to use IRAM main stack if |
diff --git a/apps/plugins/mpegplayer/alloc.c b/apps/plugins/mpegplayer/alloc.c index c2165b2ea9..eb58c67f44 100644 --- a/apps/plugins/mpegplayer/alloc.c +++ b/apps/plugins/mpegplayer/alloc.c | |||
@@ -149,7 +149,7 @@ bool mpeg_alloc_init(unsigned char *buf, size_t mallocsize) | |||
149 | return false; | 149 | return false; |
150 | } | 150 | } |
151 | 151 | ||
152 | IF_COP(rb->cpucache_invalidate()); | 152 | IF_COP(rb->commit_discard_dcache()); |
153 | return true; | 153 | return true; |
154 | } | 154 | } |
155 | 155 | ||
diff --git a/apps/plugins/mpegplayer/video_thread.c b/apps/plugins/mpegplayer/video_thread.c index 5119712396..392cc6179f 100644 --- a/apps/plugins/mpegplayer/video_thread.c +++ b/apps/plugins/mpegplayer/video_thread.c | |||
@@ -550,7 +550,7 @@ static void video_thread_msg(struct video_thread_data *td) | |||
550 | } | 550 | } |
551 | else | 551 | else |
552 | { | 552 | { |
553 | IF_COP(rb->cpucache_invalidate()); | 553 | IF_COP(rb->commit_discard_dcache()); |
554 | vo_lock(); | 554 | vo_lock(); |
555 | rb->lcd_update(); | 555 | rb->lcd_update(); |
556 | vo_unlock(); | 556 | vo_unlock(); |
@@ -1007,7 +1007,7 @@ bool video_thread_init(void) | |||
1007 | { | 1007 | { |
1008 | intptr_t rep; | 1008 | intptr_t rep; |
1009 | 1009 | ||
1010 | IF_COP(rb->cpucache_flush()); | 1010 | IF_COP(rb->commit_dcache()); |
1011 | 1011 | ||
1012 | video_str.hdr.q = &video_str_queue; | 1012 | video_str.hdr.q = &video_str_queue; |
1013 | rb->queue_init(video_str.hdr.q, false); | 1013 | rb->queue_init(video_str.hdr.q, false); |
@@ -1025,7 +1025,7 @@ bool video_thread_init(void) | |||
1025 | 1025 | ||
1026 | /* Wait for thread to initialize */ | 1026 | /* Wait for thread to initialize */ |
1027 | rep = str_send_msg(&video_str, STREAM_NULL, 0); | 1027 | rep = str_send_msg(&video_str, STREAM_NULL, 0); |
1028 | IF_COP(rb->cpucache_invalidate()); | 1028 | IF_COP(rb->commit_discard_dcache()); |
1029 | 1029 | ||
1030 | return rep == 0; /* Normally STREAM_NULL should be ignored */ | 1030 | return rep == 0; /* Normally STREAM_NULL should be ignored */ |
1031 | } | 1031 | } |
@@ -1037,7 +1037,7 @@ void video_thread_exit(void) | |||
1037 | { | 1037 | { |
1038 | str_post_msg(&video_str, STREAM_QUIT, 0); | 1038 | str_post_msg(&video_str, STREAM_QUIT, 0); |
1039 | rb->thread_wait(video_str.thread); | 1039 | rb->thread_wait(video_str.thread); |
1040 | IF_COP(rb->cpucache_invalidate()); | 1040 | IF_COP(rb->commit_discard_dcache()); |
1041 | video_str.thread = 0; | 1041 | video_str.thread = 0; |
1042 | } | 1042 | } |
1043 | } | 1043 | } |
diff --git a/apps/plugins/plugin_crt0.c b/apps/plugins/plugin_crt0.c index 917ccb11a9..680bb0723d 100644 --- a/apps/plugins/plugin_crt0.c +++ b/apps/plugins/plugin_crt0.c | |||
@@ -76,10 +76,8 @@ enum plugin_status plugin__start(const void *param) | |||
76 | rb->audio_stop(); | 76 | rb->audio_stop(); |
77 | rb->memcpy(iramstart, iramcopy, iram_size); | 77 | rb->memcpy(iramstart, iramcopy, iram_size); |
78 | rb->memset(iedata, 0, ibss_size); | 78 | rb->memset(iedata, 0, ibss_size); |
79 | #ifdef HAVE_CPUCACHE_INVALIDATE | ||
80 | /* make the icache (if it exists) up to date with the new code */ | 79 | /* make the icache (if it exists) up to date with the new code */ |
81 | rb->cpucache_invalidate(); | 80 | rb->commit_discard_idcache(); |
82 | #endif /* HAVE_CPUCACHE_INVALIDATE */ | ||
83 | 81 | ||
84 | /* barrier to prevent reordering iram copy and BSS clearing, | 82 | /* barrier to prevent reordering iram copy and BSS clearing, |
85 | * because the BSS segment alias the IRAM copy. | 83 | * because the BSS segment alias the IRAM copy. |
@@ -91,12 +89,10 @@ enum plugin_status plugin__start(const void *param) | |||
91 | /* zero out the bss section */ | 89 | /* zero out the bss section */ |
92 | rb->memset(plugin_bss_start, 0, plugin_end_addr - plugin_bss_start); | 90 | rb->memset(plugin_bss_start, 0, plugin_end_addr - plugin_bss_start); |
93 | 91 | ||
94 | #ifdef HAVE_CPUCACHE_INVALIDATE | ||
95 | /* Some parts of bss may be used via a no-cache alias (at least | 92 | /* Some parts of bss may be used via a no-cache alias (at least |
96 | * portalplayer has this). If we don't clear the cache, those aliases | 93 | * portalplayer has this). If we don't clear the cache, those aliases |
97 | * may read garbage */ | 94 | * may read garbage */ |
98 | rb->cpucache_invalidate(); | 95 | rb->commit_dcache(); |
99 | #endif /* HAVE_CPUCACHE_INVALIDATE */ | ||
100 | #endif | 96 | #endif |
101 | 97 | ||
102 | /* we come back here if exit() was called or the plugin returned normally */ | 98 | /* we come back here if exit() was called or the plugin returned normally */ |