Skip to content

Commit 485653c

Browse files
committed
notifier: add notifier free support
To power down a secondary core gracefully, we need to free the notifier related memory used on the corresponding core cleanly, which will help to create clean one on the next powering up to the core. Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
1 parent 5fc2b97 commit 485653c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/lib/notifier.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ void init_system_notify(struct sof *sof)
189189
{
190190
struct notify **notify = arch_notify_get();
191191
int i;
192-
*notify = rzalloc(SOF_MEM_ZONE_SYS, 0, SOF_MEM_CAPS_RAM,
192+
*notify = rzalloc(SOF_MEM_ZONE_SYS_RUNTIME, 0, SOF_MEM_CAPS_RAM,
193193
sizeof(**notify));
194194

195195
spinlock_init(&(*notify)->lock);
@@ -203,4 +203,7 @@ void init_system_notify(struct sof *sof)
203203

204204
void free_system_notify(void)
205205
{
206+
struct notify **notify = arch_notify_get();
207+
208+
rfree(*notify);
206209
}

0 commit comments

Comments
 (0)