Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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
2 changes: 2 additions & 0 deletions cmake/linker_script/common/common-ram.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ zephyr_iterable_section(NAME k_pipe GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SU
zephyr_iterable_section(NAME k_sem GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
zephyr_iterable_section(NAME k_queue GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
zephyr_iterable_section(NAME k_condvar GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
zephyr_iterable_section(NAME k_zync GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
zephyr_iterable_section(NAME z_zync_pair GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)

zephyr_linker_section(NAME _net_buf_pool_area GROUP DATA_REGION NOINPUT ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
zephyr_linker_section_configure(SECTION _net_buf_pool_area
Expand Down
4 changes: 2 additions & 2 deletions doc/services/tracing/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,8 @@ all initialized mutexes, one can write::

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, but there are no trackers (or tracing) for zync :(

Isn't this downgrading Zephyr debug capabilities?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, good catch. Yeah, I'd removed these intending to add new ones for the new primitives and never got back to it. Will wire it up; is that a -1 or are you OK adding that after the initial merge?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't have strong feelings, but I kinda think it's important to have tracing/tracking available from the get-go, as this is new stuff that may cause mysterious and subtle bugs on certain workloads, and having a nice way to debug zync behaviour would be really handy. Don't you think?
But I maybe overestimating tracing/tracking importance here...

Copy link
Member

Choose a reason for hiding this comment

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

This needs to be reenabled as part of this PR or whatever removes it. We can't be dropping features with the promise to add them later.

To enable object tracking, enable :kconfig:option:`CONFIG_TRACING_OBJECT_TRACKING`.
Note that each list can be enabled or disabled via their tracing
configuration. For example, to disable tracking of semaphores, one can
disable :kconfig:option:`CONFIG_TRACING_SEMAPHORE`.
configuration. For example, to disable tracking of FIFOs, one can
disable :kconfig:option:`CONFIG_TRACING_FIFO`.

Object tracking is behind tracing configuration as it currently leverages
tracing infrastructure to perform the tracking.
Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/hci/hci_b91.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#define HCI_BT_B91_TIMEOUT K_MSEC(2000)

static K_SEM_DEFINE(hci_send_sem, 1, 1);
K_SEM_STATIC_DEFINE(hci_send_sem, 1, 1);

static bool is_hci_event_discardable(const uint8_t *evt_data)
{
Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/hci/hci_esp32.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#define HCI_BT_ESP32_TIMEOUT K_MSEC(2000)

static K_SEM_DEFINE(hci_send_sem, 1, 1);
K_SEM_STATIC_DEFINE(hci_send_sem, 1, 1);

static bool is_hci_event_discardable(const uint8_t *evt_data)
{
Expand Down
8 changes: 4 additions & 4 deletions drivers/bluetooth/hci/ipm_stm32wb.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ static void sysevt_received(void *pdata);

#define STM32WB_C2_LOCK_TIMEOUT K_MSEC(500)

static K_SEM_DEFINE(c2_started, 0, 1);
static K_SEM_DEFINE(ble_sys_wait_cmd_rsp, 0, 1);
static K_SEM_DEFINE(acl_data_ack, 1, 1);
static K_SEM_DEFINE(ipm_busy, 1, 1);
K_SEM_STATIC_DEFINE(c2_started, 0, 1);
K_SEM_STATIC_DEFINE(ble_sys_wait_cmd_rsp, 0, 1);
K_SEM_STATIC_DEFINE(acl_data_ack, 1, 1);
K_SEM_STATIC_DEFINE(ipm_busy, 1, 1);

struct aci_set_tx_power {
uint8_t cmd;
Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/hci/rpmsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#define IPC_BOUND_TIMEOUT_IN_MS K_MSEC(1000)

static struct ipc_ept hci_ept;
static K_SEM_DEFINE(ipc_bound_sem, 0, 1);
K_SEM_STATIC_DEFINE(ipc_bound_sem, 0, 1);

static bool is_hci_event_discardable(const uint8_t *evt_data)
{
Expand Down
6 changes: 3 additions & 3 deletions drivers/bluetooth/hci/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ static const struct gpio_dt_spec rst_gpio = GPIO_DT_SPEC_INST_GET(0, reset_gpios

static struct gpio_callback gpio_cb;

static K_SEM_DEFINE(sem_initialised, 0, 1);
static K_SEM_DEFINE(sem_request, 0, 1);
static K_SEM_DEFINE(sem_busy, 1, 1);
K_SEM_STATIC_DEFINE(sem_initialised, 0, 1);
K_SEM_STATIC_DEFINE(sem_request, 0, 1);
K_SEM_STATIC_DEFINE(sem_busy, 1, 1);

static K_KERNEL_STACK_DEFINE(spi_rx_stack, 512);
static struct k_thread spi_rx_thread_data;
Expand Down
1 change: 1 addition & 0 deletions drivers/counter/counter_mchp_xec.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
LOG_MODULE_REGISTER(counter_mchp_xec, CONFIG_COUNTER_LOG_LEVEL);

#include <zephyr/drivers/counter.h>
#include <zephyr/irq.h>
#include <soc.h>
#include <errno.h>
#include <stdbool.h>
Expand Down
4 changes: 2 additions & 2 deletions drivers/ec_host_cmd_periph/ec_host_cmd_simulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ static uint8_t rx_buffer[256];
static size_t rx_buffer_len;

/* Allow writing to rx buff at startup and block on reading. */
static K_SEM_DEFINE(handler_owns, 0, 1);
static K_SEM_DEFINE(dev_owns, 1, 1);
K_SEM_STATIC_DEFINE(handler_owns, 0, 1);
K_SEM_STATIC_DEFINE(dev_owns, 1, 1);

static ec_host_cmd_periph_api_send tx;

Expand Down
6 changes: 3 additions & 3 deletions drivers/modem/hl7800.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,9 @@ NET_BUF_POOL_DEFINE(mdm_recv_pool, CONFIG_MODEM_HL7800_RECV_BUF_CNT,

static uint8_t mdm_recv_buf[MDM_MAX_DATA_LENGTH];

static K_SEM_DEFINE(hl7800_RX_lock_sem, 1, 1);
static K_SEM_DEFINE(hl7800_TX_lock_sem, 1, 1);
static K_MUTEX_DEFINE(cb_lock);
K_SEM_STATIC_DEFINE(hl7800_RX_lock_sem, 1, 1);
K_SEM_STATIC_DEFINE(hl7800_TX_lock_sem, 1, 1);
K_MUTEX_STATIC_DEFINE(cb_lock);

/* RX thread structures */
K_THREAD_STACK_DEFINE(hl7800_rx_stack, CONFIG_MODEM_HL7800_RX_STACK_SIZE);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ppp.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ static bool rx_retry_pending;
static bool uart_recovery_pending;
static uint8_t *next_buf;

static K_SEM_DEFINE(uarte_tx_finished, 0, 1);
K_SEM_STATIC_DEFINE(uarte_tx_finished, 0, 1);

static void uart_callback(const struct device *dev,
struct uart_event *evt,
Expand Down
1 change: 1 addition & 0 deletions drivers/watchdog/wdt_mchp_xec.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
LOG_MODULE_REGISTER(wdt_mchp_xec);

#include <zephyr/drivers/watchdog.h>
#include <zephyr/irq.h>
#include <soc.h>
#include <errno.h>

Expand Down
2 changes: 1 addition & 1 deletion drivers/wifi/simplelink/simplelink.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ struct simplelink_data {
};

static struct simplelink_data simplelink_data;
static K_SEM_DEFINE(ip_acquired, 0, 1);
K_SEM_STATIC_DEFINE(ip_acquired, 0, 1);

/* Handle connection events from the SimpleLink Event Handlers: */
static void simplelink_wifi_cb(uint32_t event, struct sl_connect_state *conn)
Expand Down
1 change: 1 addition & 0 deletions include/zephyr/drivers/kscan.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <zephyr/types.h>
#include <stddef.h>
#include <zephyr/device.h>
#include <errno.h>

#ifdef __cplusplus
extern "C" {
Expand Down
Loading