qcacmn: Use save_stack_trace_tsk() to save task stack trace
qdf_print_thread_trace() currently uses stack_trace_save_tsk() to save task stack strace into a storage array, but stack_trace_save_tsk() is undefined because it is not exported. Switch to using save_stack_trace_tsk() as originally was done. Change-Id: Ie90cdd87233581718e9a40436128a92691fc9a17 CRs-Fixed: 2587454
This commit is contained in:
@@ -190,7 +190,7 @@ qdf_export_symbol(qdf_wake_up_process);
|
||||
#if ((defined(WLAN_HOST_ARCH_ARM) && !WLAN_HOST_ARCH_ARM) || \
|
||||
LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) || \
|
||||
defined(BACKPORTED_EXPORT_SAVE_STACK_TRACE_TSK_ARM)) && \
|
||||
defined(CONFIG_STACKTRACE)
|
||||
defined(CONFIG_STACKTRACE) && !defined(CONFIG_ARCH_STACKWALK)
|
||||
#define QDF_PRINT_TRACE_COUNT 32
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 2, 0))
|
||||
@@ -199,12 +199,15 @@ void qdf_print_thread_trace(qdf_thread_t *thread)
|
||||
const int spaces = 4;
|
||||
struct task_struct *task = thread;
|
||||
unsigned long entries[QDF_PRINT_TRACE_COUNT] = {0};
|
||||
unsigned int nr_entries;
|
||||
unsigned int max_entries = QDF_PRINT_TRACE_COUNT;
|
||||
int skip = 0;
|
||||
struct stack_trace trace = {
|
||||
.nr_entries = 0,
|
||||
.skip = 0,
|
||||
.entries = &entries[0],
|
||||
.max_entries = QDF_PRINT_TRACE_COUNT,
|
||||
};
|
||||
|
||||
nr_entries = stack_trace_save_tsk(task, entries, max_entries, skip);
|
||||
stack_trace_print(entries, nr_entries, spaces);
|
||||
save_stack_trace_tsk(task, &trace);
|
||||
stack_trace_print(entries, trace.nr_entries, spaces);
|
||||
}
|
||||
#else
|
||||
void qdf_print_thread_trace(qdf_thread_t *thread)
|
||||
|
Reference in New Issue
Block a user