Commit | Line | Data |
---|---|---|
c942fddf | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
cd11016e AP |
2 | /* |
3 | * A generic stack depot implementation | |
4 | * | |
5 | * Author: Alexander Potapenko <glider@google.com> | |
6 | * Copyright (C) 2016 Google, Inc. | |
7 | * | |
8 | * Based on code by Dmitry Chernenkov. | |
cd11016e AP |
9 | */ |
10 | ||
11 | #ifndef _LINUX_STACKDEPOT_H | |
12 | #define _LINUX_STACKDEPOT_H | |
13 | ||
14 | typedef u32 depot_stack_handle_t; | |
15 | ||
c0cfc337 TG |
16 | depot_stack_handle_t stack_depot_save(unsigned long *entries, |
17 | unsigned int nr_entries, gfp_t gfp_flags); | |
cd11016e | 18 | |
c0cfc337 TG |
19 | unsigned int stack_depot_fetch(depot_stack_handle_t handle, |
20 | unsigned long **entries); | |
cd11016e | 21 | |
505a0ef1 AP |
22 | unsigned int filter_irq_stacks(unsigned long *entries, unsigned int nr_entries); |
23 | ||
e1fdc403 VJ |
24 | #ifdef CONFIG_STACKDEPOT |
25 | int stack_depot_init(void); | |
26 | #else | |
27 | static inline int stack_depot_init(void) | |
28 | { | |
29 | return 0; | |
30 | } | |
31 | #endif /* CONFIG_STACKDEPOT */ | |
32 | ||
cd11016e | 33 | #endif |