diff options
author | Jens Arnold <amiconn@rockbox.org> | 2008-04-06 13:26:39 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2008-04-06 13:26:39 +0000 |
commit | f79bfcf1d7624c233222cc18d2aa35e297a80d85 (patch) | |
tree | 75b1676fa59d4f00e951883ee09fcecb56ea1792 /apps | |
parent | 4ab52c34568b1166bbea65bcc6a53550a50d98a2 (diff) |
PP targets: Make sure the COP cache is invalidated before loading a plugin.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16984 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugin.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/plugin.c b/apps/plugin.c index 66e3d634df..7a8e0e04be 100644 --- a/apps/plugin.c +++ b/apps/plugin.c @@ -585,10 +585,13 @@ int plugin_load(const char* plugin, void* parameter) struct plugin_header *hdr; #ifdef SIMULATOR void *pd; -#else +#else /* !SIMULATOR */ int fd; ssize_t readsize; +#if NUM_CORES > 1 + unsigned my_core; #endif +#endif /* !SIMULATOR */ int xm, ym; #ifdef HAVE_REMOTE_LCD int rxm, rym; @@ -637,6 +640,12 @@ int plugin_load(const char* plugin, void* parameter) gui_syncsplash(HZ*2, str(LANG_PLUGIN_CANT_OPEN), plugin); return fd; } +#if NUM_CORES > 1 + /* Make sure COP cache is flushed and invalidated before loading */ + my_core = switch_core(CURRENT_CORE ^ 1); + invalidate_icache(); + switch_core(my_core); +#endif readsize = read(fd, pluginbuf, PLUGIN_BUFFER_SIZE); close(fd); |