Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/schedule/zephyr_ll.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ static void zephyr_ll_lock(struct zephyr_ll *sch, uint32_t *flags)
k_mutex_lock(sch->lock, K_FOREVER);
zephyr_ll_lock_acquired(sch->core);
#else
irq_local_disable(*flags);
*flags = arch_irq_lock();
#endif
}

Expand All @@ -89,7 +89,7 @@ static void zephyr_ll_unlock(struct zephyr_ll *sch, uint32_t *flags)
zephyr_ll_lock_releasing(sch->core);
k_mutex_unlock(sch->lock);
#else
irq_local_enable(*flags);
arch_irq_unlock(*flags);
#endif
}

Expand Down
30 changes: 5 additions & 25 deletions zephyr/wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,8 @@ DECLARE_TR_CTX(zephyr_tr, SOF_UUID(zephyr_uuid), LOG_LEVEL_INFO);

/*
* Interrupts.
*
* Mostly mapped. Still needs some linkage symbols that can be removed later.
*/

/* needed for linkage only */
const char irq_name_level2[] = "level2";
const char irq_name_level5[] = "level5";

/* AMD platforms without native drivers use the legacy SOF interrupt API */
#if defined(CONFIG_AMD) && !defined(CONFIG_ZEPHYR_NATIVE_DRIVERS)
int interrupt_register(uint32_t irq, void(*handler)(void *arg), void *arg)
Expand Down Expand Up @@ -118,16 +112,6 @@ void interrupt_unmask(uint32_t irq, unsigned int cpu)
}
#endif

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All non native zephyr code is getting removed, platforms have to transition to native zephyr.

void platform_interrupt_set(uint32_t irq)
{
/* handled by zephyr - needed for linkage */
}

void platform_interrupt_clear(uint32_t irq, uint32_t mask)
{
/* handled by zephyr - needed for linkage */
}

/*
* Asynchronous Messaging Service
*
Expand Down Expand Up @@ -156,23 +140,19 @@ struct notify **arch_notify_get(void)
return host_notify + cpu_get_id();
}

#if defined(CONFIG_AMD) && !defined(CONFIG_ZEPHYR_NATIVE_DRIVERS)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Zephyr tooling should be used here, will check that this change compiles with Zephyr, if so we could also remove the old sof script too.

/*
* Debug
*/
void arch_dump_regs_a(void *dump_buf)
{
/* needed for linkage only */
}

/*
* Xtensa. TODO: this needs removed and fixed in SOF.
* Xtensa. Used by arch_interrupt_disable_mask() in the legacy interrupt
* code of the AMD platforms without native drivers.
* TODO: remove with the legacy interrupt code.
*/
unsigned int _xtos_ints_off(unsigned int mask)
{
/* turn all local IRQs OFF */
irq_lock();
return 0;
}
#endif

int task_main_start(struct sof *sof)
{
Expand Down
Loading