zephyr/subsys/bluetooth/controller/ll_sw/openisa/hal/cpu.h
Vinayak Kariappa Chettimada b7acb6bf55 Bluetooth: controller: openisa: Fix to use compiler memory barrier
Fix OpenISA port to include compiler memory barrier as in
commit 1a14f8b3a6 ("Bluetooth: controller: Use DMB instead
of DSB").

Relates to commit 1af2b91c23 ("Bluetooth: controller: Fix
Tx Buffer Overflow") and to commit ef2ece82c0 ("Bluetooth:
controller: openisa: Fix sanitycheck failures") and to
commit c2fc629dd2 ("Bluetooth: controller: 255 byte AD
payload support").

Fixes #31937.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-02-03 14:16:12 -05:00

23 lines
458 B
C

/*
* Copyright (c) 2016 Nordic Semiconductor ASA
* Copyright (c) 2016 Vinayak Kariappa Chettimada
*
* SPDX-License-Identifier: Apache-2.0
*/
static inline void cpu_sleep(void)
{
__WFE();
/* __SEV(); */
__WFE();
}
static inline void cpu_dmb(void)
{
/* FIXME: Add necessary host machine required Data Memory Barrier
* instruction alongwith the below defined compiler memory
* clobber.
*/
__asm__ volatile ("" : : : "memory");
}