mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
BACKPORT: arm64: Make some stacktrace functions private
Now that open-coded stack unwinds have been converted to
arch_stack_walk(), we no longer need to expose any of unwind_frame(),
walk_stackframe(), or start_backtrace() outside of stacktrace.c.
Make those functions private to stacktrace.c, removing their prototypes
from <asm/stacktrace.h> and marking them static.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Cc: Madhavan T. Venkataraman <madvenka@linux.microsoft.com>
Link: https://lore.kernel.org/r/20211129142849.3056714-10-mark.rutland@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit d2d1d2645c)
[willdeacon@: Retain 'notrace' annotation on start_backtrace() from LTS merge]
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 233587962
Bug: 233588291
Change-Id: I3e3288fed5060dd457ecbea2ccad15af105a1224
This commit is contained in:
committed by
Quentin Perret
parent
2ef3336f08
commit
1b97dc8fd6
@@ -55,9 +55,6 @@ struct stackframe {
|
||||
enum stack_type prev_type;
|
||||
};
|
||||
|
||||
extern int unwind_frame(struct task_struct *tsk, struct stackframe *frame);
|
||||
extern void walk_stackframe(struct task_struct *tsk, struct stackframe *frame,
|
||||
bool (*fn)(void *, unsigned long), void *data);
|
||||
extern void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk,
|
||||
const char *loglvl);
|
||||
|
||||
@@ -142,7 +139,4 @@ static inline bool on_accessible_stack(const struct task_struct *tsk,
|
||||
return false;
|
||||
}
|
||||
|
||||
void start_backtrace(struct stackframe *frame, unsigned long fp,
|
||||
unsigned long pc);
|
||||
|
||||
#endif /* __ASM_STACKTRACE_H */
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
*/
|
||||
|
||||
|
||||
notrace void start_backtrace(struct stackframe *frame, unsigned long fp,
|
||||
unsigned long pc)
|
||||
static notrace void start_backtrace(struct stackframe *frame, unsigned long fp,
|
||||
unsigned long pc)
|
||||
{
|
||||
frame->fp = fp;
|
||||
frame->pc = pc;
|
||||
@@ -61,7 +61,8 @@ NOKPROBE_SYMBOL(start_backtrace);
|
||||
* records (e.g. a cycle), determined based on the location and fp value of A
|
||||
* and the location (but not the fp value) of B.
|
||||
*/
|
||||
int notrace unwind_frame(struct task_struct *tsk, struct stackframe *frame)
|
||||
static int notrace unwind_frame(struct task_struct *tsk,
|
||||
struct stackframe *frame)
|
||||
{
|
||||
unsigned long fp = frame->fp;
|
||||
struct stack_info info;
|
||||
@@ -135,8 +136,9 @@ int notrace unwind_frame(struct task_struct *tsk, struct stackframe *frame)
|
||||
}
|
||||
NOKPROBE_SYMBOL(unwind_frame);
|
||||
|
||||
void notrace walk_stackframe(struct task_struct *tsk, struct stackframe *frame,
|
||||
bool (*fn)(void *, unsigned long), void *data)
|
||||
static void notrace walk_stackframe(struct task_struct *tsk,
|
||||
struct stackframe *frame,
|
||||
bool (*fn)(void *, unsigned long), void *data)
|
||||
{
|
||||
while (1) {
|
||||
int ret;
|
||||
|
||||
Reference in New Issue
Block a user