.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Simple stack backtrace regression test module |
---|
3 | 4 | * |
---|
4 | 5 | * (C) Copyright 2008 Intel Corporation |
---|
5 | 6 | * 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. |
---|
11 | 7 | */ |
---|
12 | 8 | |
---|
13 | 9 | #include <linux/completion.h> |
---|
.. | .. |
---|
33 | 29 | complete(&backtrace_work); |
---|
34 | 30 | } |
---|
35 | 31 | |
---|
36 | | -static DECLARE_TASKLET(backtrace_tasklet, &backtrace_test_irq_callback, 0); |
---|
| 32 | +static DECLARE_TASKLET_OLD(backtrace_tasklet, &backtrace_test_irq_callback); |
---|
37 | 33 | |
---|
38 | 34 | static void backtrace_test_irq(void) |
---|
39 | 35 | { |
---|
.. | .. |
---|
48 | 44 | #ifdef CONFIG_STACKTRACE |
---|
49 | 45 | static void backtrace_test_saved(void) |
---|
50 | 46 | { |
---|
51 | | - struct stack_trace trace; |
---|
52 | 47 | unsigned long entries[8]; |
---|
| 48 | + unsigned int nr_entries; |
---|
53 | 49 | |
---|
54 | 50 | pr_info("Testing a saved backtrace.\n"); |
---|
55 | 51 | pr_info("The following trace is a kernel self test and not a bug!\n"); |
---|
56 | 52 | |
---|
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); |
---|
64 | 55 | } |
---|
65 | 56 | #else |
---|
66 | 57 | static void backtrace_test_saved(void) |
---|