hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/kernel/backtracetest.c
....@@ -1,13 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Simple stack backtrace regression test module
34 *
45 * (C) Copyright 2008 Intel Corporation
56 * Author: Arjan van de Ven <arjan@linux.intel.com>
6
- *
7
- * This program is free software; you can redistribute it and/or
8
- * modify it under the terms of the GNU General Public License
9
- * as published by the Free Software Foundation; version 2
10
- * of the License.
117 */
128
139 #include <linux/completion.h>
....@@ -33,7 +29,7 @@
3329 complete(&backtrace_work);
3430 }
3531
36
-static DECLARE_TASKLET(backtrace_tasklet, &backtrace_test_irq_callback, 0);
32
+static DECLARE_TASKLET_OLD(backtrace_tasklet, &backtrace_test_irq_callback);
3733
3834 static void backtrace_test_irq(void)
3935 {
....@@ -48,19 +44,14 @@
4844 #ifdef CONFIG_STACKTRACE
4945 static void backtrace_test_saved(void)
5046 {
51
- struct stack_trace trace;
5247 unsigned long entries[8];
48
+ unsigned int nr_entries;
5349
5450 pr_info("Testing a saved backtrace.\n");
5551 pr_info("The following trace is a kernel self test and not a bug!\n");
5652
57
- trace.nr_entries = 0;
58
- trace.max_entries = ARRAY_SIZE(entries);
59
- trace.entries = entries;
60
- trace.skip = 0;
61
-
62
- save_stack_trace(&trace);
63
- print_stack_trace(&trace, 0);
53
+ nr_entries = stack_trace_save(entries, ARRAY_SIZE(entries), 0);
54
+ stack_trace_print(entries, nr_entries, 0);
6455 }
6556 #else
6657 static void backtrace_test_saved(void)