Skip to content

Commit 43de88f

Browse files
committed
dram: (cosmetic) rename debugging with dbg_
Rename debugging functions to clearly indicate their debugging purpose. Suggested-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent 2a322f5 commit 43de88f

7 files changed

Lines changed: 22 additions & 22 deletions

File tree

posix/include/sof/lib/memory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
#endif
2020

2121
#define assert_can_be_cold() do {} while (0)
22-
#define mem_hot_path_confirm() do {} while (0)
22+
#define dbg_path_hot_confirm() do {} while (0)
2323

2424
#endif /* __SOF_LIB_MEMORY_H__ */

src/debug/dram.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@
77
#include <zephyr/logging/log.h>
88
#include <zephyr/sys/__assert.h>
99

10-
LOG_MODULE_REGISTER(dram_debug, CONFIG_SOF_LOG_LEVEL);
10+
LOG_MODULE_REGISTER(dbg_path, CONFIG_SOF_LOG_LEVEL);
1111

1212
static struct k_spinlock hot_path_lock;
1313
static unsigned int hot_path_depth;
1414
static const char *cold_path_fn;
1515
static bool hot_path_confirmed;
1616

17-
void mem_cold_path_enter(const char *fn)
17+
void dbg_path_cold_enter(const char *fn)
1818
{
1919
k_spinlock_key_t key = k_spin_lock(&hot_path_lock);
2020

2121
cold_path_fn = fn;
2222

2323
k_spin_unlock(&hot_path_lock, key);
2424
}
25-
EXPORT_SYMBOL(mem_cold_path_enter);
25+
EXPORT_SYMBOL(dbg_path_cold_enter);
2626

27-
void mem_hot_path_start_watching(void)
27+
void dbg_path_hot_start_watching(void)
2828
{
2929
k_spinlock_key_t key = k_spin_lock(&hot_path_lock);
3030

@@ -36,7 +36,7 @@ void mem_hot_path_start_watching(void)
3636
k_spin_unlock(&hot_path_lock, key);
3737
}
3838

39-
void mem_hot_path_confirm(void)
39+
void dbg_path_hot_confirm(void)
4040
{
4141
k_spinlock_key_t key = k_spin_lock(&hot_path_lock);
4242

@@ -45,7 +45,7 @@ void mem_hot_path_confirm(void)
4545
k_spin_unlock(&hot_path_lock, key);
4646
}
4747

48-
void mem_hot_path_stop_watching(void)
48+
void dbg_path_hot_stop_watching(void)
4949
{
5050
bool underrun, error;
5151
k_spinlock_key_t key = k_spin_lock(&hot_path_lock);

src/idc/idc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,9 +425,9 @@ void idc_cmd(struct idc_msg *msg)
425425
notifier_notify_remote();
426426
break;
427427
case iTS(IDC_MSG_IPC):
428-
mem_hot_path_start_watching();
428+
dbg_path_hot_start_watching();
429429
idc_ipc();
430-
mem_hot_path_stop_watching();
430+
dbg_path_hot_stop_watching();
431431
break;
432432
#if CONFIG_IPC_MAJOR_4
433433
case iTS(IDC_MSG_BIND):

src/ipc/ipc-zephyr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,14 +217,14 @@ enum task_state ipc_platform_do_cmd(struct ipc *ipc)
217217
{
218218
struct ipc_cmd_hdr *hdr;
219219

220-
mem_hot_path_start_watching();
220+
dbg_path_hot_start_watching();
221221

222222
hdr = ipc_compact_read_msg();
223223

224224
/* perform command */
225225
ipc_cmd(hdr);
226226

227-
mem_hot_path_stop_watching();
227+
dbg_path_hot_stop_watching();
228228

229229
if (ipc->task_mask & IPC_TASK_POWERDOWN ||
230230
ipc_get()->pm_prepare_D3) {

src/ipc/ipc4/handler.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ int ipc4_pipeline_trigger(struct ipc_comp_dev *ppl_icd, uint32_t cmd, bool *dela
484484
* mem_hot_path_start_watching() - mem_hot_path_stop_watching()
485485
* brackets, the latter will generate an error / trigger a panic.
486486
*/
487-
mem_hot_path_confirm();
487+
dbg_path_hot_confirm();
488488

489489
/* trigger the component */
490490
ret = pipeline_trigger(host->cd->pipeline, host->cd, cmd);

xtos/include/sof/lib/memory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
#endif
2020

2121
#define assert_can_be_cold() do {} while (0)
22-
#define mem_hot_path_confirm() do {} while (0)
22+
#define dbg_path_hot_confirm() do {} while (0)
2323

2424
#endif /* __SOF_LIB_MEMORY_H__ */

zephyr/include/sof/lib/memory.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,22 @@ bool ll_sch_is_current(void);
2525
#define ll_sch_is_current() false
2626
#endif
2727

28-
void mem_hot_path_start_watching(void);
29-
void mem_hot_path_stop_watching(void);
30-
void mem_hot_path_confirm(void);
31-
void mem_cold_path_enter(const char *fn);
28+
void dbg_path_hot_start_watching(void);
29+
void dbg_path_hot_stop_watching(void);
30+
void dbg_path_hot_confirm(void);
31+
void dbg_path_cold_enter(const char *fn);
3232

3333
static inline void __assert_can_be_cold(const char *fn)
3434
{
3535
__ASSERT(!ll_sch_is_current(), "%s() called from an LL thread!", fn);
36-
mem_cold_path_enter(fn);
36+
dbg_path_cold_enter(fn);
3737
}
3838
#define assert_can_be_cold() __assert_can_be_cold(__func__)
3939
#else
40-
#define mem_hot_path_start_watching() do {} while (0)
41-
#define mem_hot_path_stop_watching() do {} while (0)
42-
#define mem_hot_path_confirm() do {} while (0)
43-
#define mem_cold_path_enter() do {} while (0)
40+
#define dbg_path_hot_start_watching() do {} while (0)
41+
#define dbg_path_hot_stop_watching() do {} while (0)
42+
#define dbg_path_hot_confirm() do {} while (0)
43+
#define dbg_path_cold_enter() do {} while (0)
4444
#define assert_can_be_cold() do {} while (0)
4545
#endif
4646

0 commit comments

Comments
 (0)