notifier: Use coherent memory allocation

The notifier struct contains a spin lock which was located in
incoherent memory. This caused an assert on startup when enabling the
build with CONFIG_ASSERT.

At the very least this fix enables building and running with
SPIN_VALIDATE and ASSERT which could help diagnosing issues such
as the panic_dump being garbled.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
This commit is contained in:
Tom Burdick 2022-03-30 16:59:22 -05:00 committed by Liam Girdwood
parent b154132b46
commit 85a9172030
1 changed files with 1 additions and 1 deletions

View File

@ -191,7 +191,7 @@ void init_system_notify(struct sof *sof)
{ {
struct notify **notify = arch_notify_get(); struct notify **notify = arch_notify_get();
int i; int i;
*notify = rzalloc(SOF_MEM_ZONE_SYS, 0, SOF_MEM_CAPS_RAM, *notify = rzalloc(SOF_MEM_ZONE_SYS, SOF_MEM_FLAG_COHERENT, SOF_MEM_CAPS_RAM,
sizeof(**notify)); sizeof(**notify));
k_spinlock_init(&(*notify)->lock); k_spinlock_init(&(*notify)->lock);