summaryrefslogtreecommitdiff
path: root/apps/plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugin.c')
-rw-r--r--apps/plugin.c11
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)
585 struct plugin_header *hdr; 585 struct plugin_header *hdr;
586#ifdef SIMULATOR 586#ifdef SIMULATOR
587 void *pd; 587 void *pd;
588#else 588#else /* !SIMULATOR */
589 int fd; 589 int fd;
590 ssize_t readsize; 590 ssize_t readsize;
591#if NUM_CORES > 1
592 unsigned my_core;
591#endif 593#endif
594#endif /* !SIMULATOR */
592 int xm, ym; 595 int xm, ym;
593#ifdef HAVE_REMOTE_LCD 596#ifdef HAVE_REMOTE_LCD
594 int rxm, rym; 597 int rxm, rym;
@@ -637,6 +640,12 @@ int plugin_load(const char* plugin, void* parameter)
637 gui_syncsplash(HZ*2, str(LANG_PLUGIN_CANT_OPEN), plugin); 640 gui_syncsplash(HZ*2, str(LANG_PLUGIN_CANT_OPEN), plugin);
638 return fd; 641 return fd;
639 } 642 }
643#if NUM_CORES > 1
644 /* Make sure COP cache is flushed and invalidated before loading */
645 my_core = switch_core(CURRENT_CORE ^ 1);
646 invalidate_icache();
647 switch_core(my_core);
648#endif
640 649
641 readsize = read(fd, pluginbuf, PLUGIN_BUFFER_SIZE); 650 readsize = read(fd, pluginbuf, PLUGIN_BUFFER_SIZE);
642 close(fd); 651 close(fd);