Commit b55ce3e6 authored by Kate Hsuan's avatar Kate Hsuan Committed by Mauro Carvalho Chehab

media: atomisp: ia_css_debug: Removed unused codes for debug

This portion of the codes was not referenced so it can be completely
removed.

Link: https://lore.kernel.org/r/20230619052453.48598-2-hpa@redhat.comSigned-off-by: default avatarKate Hsuan <hpa@redhat.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 5e05f204
......@@ -141,12 +141,6 @@ static inline void __printf(2, 0) ia_css_debug_vdtrace(unsigned int level,
__printf(2, 3) void ia_css_debug_dtrace(unsigned int level,
const char *fmt, ...);
/*! @brief Dump sp thread's stack contents
* SP thread's stack contents are set to 0xcafecafe. This function dumps the
* stack to inspect if the stack's boundaries are compromised.
* @return None
*/
void ia_css_debug_dump_sp_stack_info(void);
/*! @brief Function to set the global dtrace verbosity level.
* @param[in] trace_level Maximum level of the messages to be traced.
......
......@@ -147,79 +147,6 @@ void ia_css_debug_dtrace(unsigned int level, const char *fmt, ...)
va_end(ap);
}
static void debug_dump_long_array_formatted(
const sp_ID_t sp_id,
hrt_address stack_sp_addr,
unsigned int stack_size)
{
unsigned int i;
u32 val;
u32 addr = (uint32_t)stack_sp_addr;
u32 stack_size_words = CEIL_DIV(stack_size, sizeof(uint32_t));
/* When size is not multiple of four, last word is only relevant for
* remaining bytes */
for (i = 0; i < stack_size_words; i++) {
val = sp_dmem_load_uint32(sp_id, (hrt_address)addr);
if ((i % 8) == 0)
ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE, "\n");
ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE, "0x%08x ", val);
addr += sizeof(uint32_t);
}
ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE, "\n");
}
static void debug_dump_sp_stack_info(
const sp_ID_t sp_id)
{
const struct ia_css_fw_info *fw;
unsigned int HIVE_ADDR_sp_threads_stack;
unsigned int HIVE_ADDR_sp_threads_stack_size;
u32 stack_sizes[MAX_THREAD_NUM];
u32 stack_sp_addr[MAX_THREAD_NUM];
unsigned int i;
fw = &sh_css_sp_fw;
ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE, "sp_id(%u) stack info\n", sp_id);
ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE,
"from objects stack_addr_offset:0x%x stack_size_offset:0x%x\n",
fw->info.sp.threads_stack,
fw->info.sp.threads_stack_size);
HIVE_ADDR_sp_threads_stack = fw->info.sp.threads_stack;
HIVE_ADDR_sp_threads_stack_size = fw->info.sp.threads_stack_size;
if (fw->info.sp.threads_stack == 0 ||
fw->info.sp.threads_stack_size == 0)
return;
(void)HIVE_ADDR_sp_threads_stack;
(void)HIVE_ADDR_sp_threads_stack_size;
sp_dmem_load(sp_id,
(unsigned int)sp_address_of(sp_threads_stack),
&stack_sp_addr, sizeof(stack_sp_addr));
sp_dmem_load(sp_id,
(unsigned int)sp_address_of(sp_threads_stack_size),
&stack_sizes, sizeof(stack_sizes));
for (i = 0 ; i < MAX_THREAD_NUM; i++) {
ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE,
"thread: %u stack_addr: 0x%08x stack_size: %u\n",
i, stack_sp_addr[i], stack_sizes[i]);
debug_dump_long_array_formatted(sp_id, (hrt_address)stack_sp_addr[i],
stack_sizes[i]);
}
}
void ia_css_debug_dump_sp_stack_info(void)
{
debug_dump_sp_stack_info(SP0_ID);
}
void ia_css_debug_set_dtrace_level(const unsigned int trace_level)
{
dbg_level = trace_level;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment