Repository navigation
cavs: ipc: added ipc received and processed counters #1441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56,6 +56,24 @@ | |
|
|
||
| extern struct ipc *_ipc; | ||
|
|
||
| #if CONFIG_DEBUG_IPC_COUNTERS | ||
| static inline void increment_ipc_received_counter(void) | ||
| { | ||
| static uint32_t ipc_received_counter; | ||
|
|
||
| mailbox_sw_reg_write(SRAM_REG_FW_IPC_RECEIVED_COUNT, | ||
| ipc_received_counter++); | ||
| } | ||
|
|
||
| static inline void increment_ipc_processed_counter(void) | ||
| { | ||
| static uint32_t ipc_processed_counter; | ||
|
|
||
| mailbox_sw_reg_write(SRAM_REG_FW_IPC_PROCESSED_COUNT, | ||
| ipc_processed_counter++); | ||
| } | ||
| #endif | ||
|
|
||
| /* test code to check working IRQ */ | ||
| static void ipc_irq_handler(void *arg) | ||
| { | ||
|
|
@@ -93,6 +111,10 @@ static void ipc_irq_handler(void *arg) | |
| /* mask Busy interrupt */ | ||
| ipc_write(IPC_DIPCCTL, dipcctl & ~IPC_DIPCCTL_IPCTBIE); | ||
|
|
||
| #if CONFIG_DEBUG_IPC_COUNTERS | ||
| increment_ipc_received_counter(); | ||
| #endif | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about those "dropping msg" happened in line 117? At the case handled_counter will be never equal to recceived_counter?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @keyonjie So in current flow we will never have situation that the variable |
||
| /* TODO: place message in Q and process later */ | ||
| /* It's not Q ATM, may overwrite */ | ||
| if (_ipc->host_pending) { | ||
|
|
@@ -174,6 +196,10 @@ void ipc_platform_do_cmd(struct ipc *ipc) | |
| ipc_write(IPC_DIPCTDA, ipc_read(IPC_DIPCTDA) | IPC_DIPCTDA_BUSY); | ||
| #endif | ||
|
|
||
| #if CONFIG_DEBUG_IPC_COUNTERS | ||
| increment_ipc_processed_counter(); | ||
| #endif | ||
|
|
||
| /* unmask Busy interrupt */ | ||
| ipc_write(IPC_DIPCCTL, ipc_read(IPC_DIPCCTL) | IPC_DIPCCTL_IPCTBIE); | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.