File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3737#include "se_services.h"
3838
3939struct metal_state _metal ;
40+
41+ static bool metal_active ;
4042static mp_sched_node_t rproc_notify_node ;
4143
4244int metal_sys_init (const struct metal_init_params * params ) {
@@ -53,10 +55,13 @@ int metal_sys_init(const struct metal_init_params *params) {
5355 #endif
5456
5557 metal_bus_register (& metal_generic_bus );
58+ metal_active = true;
59+
5660 return 0 ;
5761}
5862
5963void metal_sys_finish (void ) {
64+ metal_active = false;
6065 metal_bus_unregister (& metal_generic_bus );
6166}
6267
@@ -91,6 +96,9 @@ int metal_rproc_notify(void *priv, uint32_t id) {
9196}
9297
9398void metal_rproc_notified (void ) {
99+ if (!metal_active ) {
100+ return ;
101+ }
94102 // The remote core notified this core.
95103 mp_sched_schedule_node (& rproc_notify_node , openamp_remoteproc_notified );
96104}
You can’t perform that action at this time.
0 commit comments