diff options
| author | Michael Sevakis <jethead71@rockbox.org> | 2011-12-17 07:27:24 +0000 |
|---|---|---|
| committer | Michael Sevakis <jethead71@rockbox.org> | 2011-12-17 07:27:24 +0000 |
| commit | 6a67707b5ec3b2c649c401550bb7fdef2b7c8d07 (patch) | |
| tree | bfe31942a4abbaac09ad0f4226effdcef8bf097e /apps/codecs | |
| parent | 43d7a75369286dc3b39b858df34f66b0b45de34e (diff) | |
| download | rockbox-6a67707b5ec3b2c649c401550bb7fdef2b7c8d07.zip rockbox-6a67707b5ec3b2c649c401550bb7fdef2b7c8d07.tar.gz rockbox-6a67707b5ec3b2c649c401550bb7fdef2b7c8d07.tar.bz2 rockbox-6a67707b5ec3b2c649c401550bb7fdef2b7c8d07.tar.xz | |
Commit to certain names for cache coherency APIs and discard the aliases.
Wouldn't surprise me a bit to get some non-green.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31339 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to '')
| -rw-r--r-- | apps/codecs.c | 6 | ||||
| -rw-r--r-- | apps/codecs.h | 7 | ||||
| -rw-r--r-- | apps/codecs/codec_crt0.c | 4 | ||||
| -rw-r--r-- | apps/codecs/mpa.c | 2 | ||||
| -rw-r--r-- | apps/codecs/spc.c | 6 |
5 files changed, 14 insertions, 11 deletions
diff --git a/apps/codecs.c b/apps/codecs.c index 93542e3..fafe4ac 100644 --- a/apps/codecs.c +++ b/apps/codecs.c @@ -116,8 +116,8 @@ struct codec_api ci = { semaphore_release, #endif - cpucache_flush, - cpucache_invalidate, + commit_dcache, + commit_discard_dcache, /* strings and memory */ strcpy, @@ -165,6 +165,8 @@ struct codec_api ci = { /* new stuff at the end, sort into place next time the API gets incompatible */ + + commit_discard_idcache, }; void codec_get_full_path(char *path, const char *codec_root_fn) diff --git a/apps/codecs.h b/apps/codecs.h index f1e2a51..1334953 100644 --- a/apps/codecs.h +++ b/apps/codecs.h @@ -75,7 +75,7 @@ #define CODEC_ENC_MAGIC 0x52454E43 /* RENC */ /* increase this every time the api struct changes */ -#define CODEC_API_VERSION 43 +#define CODEC_API_VERSION 44 /* update this to latest version if a change to the api struct breaks backwards compatibility (and please take the opportunity to sort in any @@ -169,8 +169,8 @@ struct codec_api { void (*semaphore_release)(struct semaphore *s); #endif /* NUM_CORES */ - void (*cpucache_flush)(void); - void (*cpucache_invalidate)(void); + void (*commit_dcache)(void); + void (*commit_discard_dcache)(void); /* strings and memory */ char* (*strcpy)(char *dst, const char *src); @@ -223,6 +223,7 @@ struct codec_api { /* new stuff at the end, sort into place next time the API gets incompatible */ + void (*commit_discard_idcache)(void); }; /* codec header */ diff --git a/apps/codecs/codec_crt0.c b/apps/codecs/codec_crt0.c index 50a2d8b..e3c3321 100644 --- a/apps/codecs/codec_crt0.c +++ b/apps/codecs/codec_crt0.c @@ -45,7 +45,7 @@ enum codec_status codec_start(enum codec_entry_call_reason reason) ci->memcpy(iramstart, iramcopy, iram_size); ci->memset(iedata, 0, ibss_size); /* make the icache (if it exists) up to date with the new code */ - ci->cpucache_invalidate(); + ci->commit_discard_idcache(); /* barrier to prevent reordering iram copy and BSS clearing, * because the BSS segment alias the IRAM copy. */ @@ -56,7 +56,7 @@ enum codec_status codec_start(enum codec_entry_call_reason reason) /* Some parts of bss may be used via a no-cache alias (at least * portalplayer has this). If we don't clear the cache, those aliases * may read garbage */ - ci->cpucache_invalidate(); + ci->commit_dcache(); } #endif /* CONFIG_PLATFORM */ diff --git a/apps/codecs/mpa.c b/apps/codecs/mpa.c index ac81f06..f9bf7e6 100644 --- a/apps/codecs/mpa.c +++ b/apps/codecs/mpa.c @@ -274,7 +274,7 @@ static void mad_synth_thread_quit(void) die = 1; ci->semaphore_release(&synth_pending_sem); ci->thread_wait(mad_synth_thread_id); - ci->cpucache_invalidate(); + ci->commit_discard_dcache(); } #else static inline void mad_synth_thread_ready(void) diff --git a/apps/codecs/spc.c b/apps/codecs/spc.c index 94ac9ff..809562e 100644 --- a/apps/codecs/spc.c +++ b/apps/codecs/spc.c @@ -295,7 +295,7 @@ static bool emu_thread_process_msg(struct sample_queue_chunk *chunk) if (id == SPC_EMU_LOAD) { struct spc_load *ld = (struct spc_load *)chunk->data; - ci->cpucache_invalidate(); + ci->commit_discard_dcache(); SPC_Init(&spc_emu); sample_queue.retval = SPC_load_spc(&spc_emu, ld->buf, ld->size); @@ -368,7 +368,7 @@ static bool spc_emu_start(void) static inline int load_spc_buffer(uint8_t *buf, size_t size) { struct spc_load ld = { buf, size }; - ci->cpucache_flush(); + ci->commit_dcache(); return emu_thread_send_msg(SPC_EMU_LOAD, (intptr_t)&ld); } @@ -378,7 +378,7 @@ static inline void spc_emu_quit(void) emu_thread_send_msg(SPC_EMU_QUIT, 0); /* Wait for emu thread to be killed */ ci->thread_wait(emu_thread_id); - ci->cpucache_invalidate(); + ci->commit_discard_dcache(); } } |