kernel: fix usage of KERNEL_COHERENCE macro

Add missing CONFIG_ to KERNEL_COHERENCE usage in code.

Fixes #30380

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2020-12-07 13:15:42 -05:00
parent d1495e98e2
commit 39f632e7f0
5 changed files with 6 additions and 6 deletions

View file

@ -127,7 +127,7 @@ static ALWAYS_INLINE k_spinlock_key_t k_spin_lock(struct k_spinlock *l)
#ifdef CONFIG_SPIN_VALIDATE
__ASSERT(z_spin_lock_valid(l), "Recursive spinlock %p", l);
# ifdef KERNEL_COHERENCE
# ifdef CONFIG_KERNEL_COHERENCE
__ASSERT_NO_MSG(z_spin_lock_mem_coherent(l));
# endif
#endif

View file

@ -165,7 +165,7 @@ static void bg_thread_main(void *unused1, void *unused2, void *unused3)
z_init_static_threads();
#ifdef KERNEL_COHERENCE
#ifdef CONFIG_KERNEL_COHERENCE
__ASSERT_NO_MSG(arch_mem_coherent(&_kernel));
#endif

View file

@ -413,7 +413,7 @@ static void update_cache(int preempt_ok)
static void ready_thread(struct k_thread *thread)
{
#ifdef KERNEL_COHERENCE
#ifdef CONFIG_KERNEL_COHERENCE
__ASSERT_NO_MSG(arch_mem_coherent(thread));
#endif
@ -673,7 +673,7 @@ static void add_thread_timeout(struct k_thread *thread, k_timeout_t timeout)
static void pend(struct k_thread *thread, _wait_q_t *wait_q,
k_timeout_t timeout)
{
#ifdef KERNEL_COHERENCE
#ifdef CONFIG_KERNEL_COHERENCE
__ASSERT_NO_MSG(arch_mem_coherent(wait_q));
#endif

View file

@ -567,7 +567,7 @@ char *z_setup_new_thread(struct k_thread *new_thread,
z_init_thread_base(&new_thread->base, prio, _THREAD_PRESTART, options);
stack_ptr = setup_thread_stack(new_thread, stack, stack_size);
#ifdef KERNEL_COHERENCE
#ifdef CONFIG_KERNEL_COHERENCE
/* Check that the thread object is safe, but that the stack is
* still cached!
*/

View file

@ -91,7 +91,7 @@ void z_add_timeout(struct _timeout *to, _timeout_func_t fn,
return;
}
#ifdef KERNEL_COHERENCE
#ifdef CONFIG_KERNEL_COHERENCE
__ASSERT_NO_MSG(arch_mem_coherent(to));
#endif