Bluetooth: controller: openisa: Fix to use compiler memory barrier
Fix OpenISA port to include compiler memory barrier as in commit1a14f8b3a6
("Bluetooth: controller: Use DMB instead of DSB"). Relates to commit1af2b91c23
("Bluetooth: controller: Fix Tx Buffer Overflow") and to commitef2ece82c0
("Bluetooth: controller: openisa: Fix sanitycheck failures") and to commitc2fc629dd2
("Bluetooth: controller: 255 byte AD payload support"). Fixes #31937. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
59616c0b03
commit
b7acb6bf55
3 changed files with 21 additions and 16 deletions
|
@ -11,3 +11,12 @@ static inline void cpu_sleep(void)
|
|||
/* __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");
|
||||
}
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <zephyr/types.h>
|
||||
#include <toolchain.h>
|
||||
#include <soc.h>
|
||||
#include <bluetooth/hci.h>
|
||||
#include <sys/byteorder.h>
|
||||
|
||||
#include <toolchain.h>
|
||||
#include <bluetooth/hci.h>
|
||||
|
||||
#include "hal/cpu.h"
|
||||
#include "hal/ccm.h"
|
||||
#include "hal/radio.h"
|
||||
#include "hal/ticker.h"
|
||||
|
@ -40,7 +40,6 @@
|
|||
|
||||
#define LOG_MODULE_NAME bt_ctlr_llsw_openisa_lll_adv
|
||||
#include "common/log.h"
|
||||
#include <soc.h>
|
||||
#include "hal/debug.h"
|
||||
|
||||
static int init_reset(void);
|
||||
|
@ -212,14 +211,11 @@ struct pdu_adv *lll_adv_pdu_alloc(struct lll_adv_pdu *pdu, uint8_t *idx)
|
|||
uint8_t first_latest;
|
||||
|
||||
pdu->last = first;
|
||||
/* FIXME: Ensure that data is synchronized so that an ISR
|
||||
/* NOTE: Ensure that data is synchronized so that an ISR
|
||||
* vectored, after pdu->last has been updated, does
|
||||
* access the latest value. __DMB() is used in ARM
|
||||
* Cortex M4 architectures. Use appropriate
|
||||
* instructions on other platforms.
|
||||
*
|
||||
* cpu_dmb();
|
||||
* access the latest value.
|
||||
*/
|
||||
cpu_dmb();
|
||||
first_latest = pdu->first;
|
||||
if (first_latest != first) {
|
||||
last++;
|
||||
|
|
|
@ -8,16 +8,17 @@
|
|||
#include <stddef.h>
|
||||
|
||||
#include <toolchain.h>
|
||||
#include <zephyr/types.h>
|
||||
#include <soc.h>
|
||||
#include <sys/util.h>
|
||||
|
||||
#include "hal/cpu.h"
|
||||
#include "hal/ccm.h"
|
||||
#include "hal/radio.h"
|
||||
|
||||
#include "util/mem.h"
|
||||
#include "util/memq.h"
|
||||
#include "util/mfifo.h"
|
||||
|
||||
#include "hal/ccm.h"
|
||||
#include "hal/radio.h"
|
||||
|
||||
#include "pdu.h"
|
||||
|
||||
#include "lll.h"
|
||||
|
@ -29,7 +30,6 @@
|
|||
|
||||
#define LOG_MODULE_NAME bt_ctlr_llsw_openisa_lll_conn
|
||||
#include "common/log.h"
|
||||
#include <soc.h>
|
||||
#include "hal/debug.h"
|
||||
|
||||
static int init_reset(void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue