Skip to content

Commit d2d1d26

Browse files
mrutland-armctmarinas
authored andcommitted
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 <[email protected]> Reviewed-by: Mark Brown <[email protected]> Cc: Madhavan T. Venkataraman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent 2dad6dc commit d2d1d26

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

arch/arm64/include/asm/stacktrace.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ struct stackframe {
6363
#endif
6464
};
6565

66-
extern int unwind_frame(struct task_struct *tsk, struct stackframe *frame);
67-
extern void walk_stackframe(struct task_struct *tsk, struct stackframe *frame,
68-
bool (*fn)(void *, unsigned long), void *data);
6966
extern void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk,
7067
const char *loglvl);
7168

@@ -150,7 +147,4 @@ static inline bool on_accessible_stack(const struct task_struct *tsk,
150147
return false;
151148
}
152149

153-
void start_backtrace(struct stackframe *frame, unsigned long fp,
154-
unsigned long pc);
155-
156150
#endif /* __ASM_STACKTRACE_H */

arch/arm64/kernel/stacktrace.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
*/
3434

3535

36-
void start_backtrace(struct stackframe *frame, unsigned long fp,
37-
unsigned long pc)
36+
static void start_backtrace(struct stackframe *frame, unsigned long fp,
37+
unsigned long pc)
3838
{
3939
frame->fp = fp;
4040
frame->pc = pc;
@@ -63,7 +63,8 @@ void start_backtrace(struct stackframe *frame, unsigned long fp,
6363
* records (e.g. a cycle), determined based on the location and fp value of A
6464
* and the location (but not the fp value) of B.
6565
*/
66-
int notrace unwind_frame(struct task_struct *tsk, struct stackframe *frame)
66+
static int notrace unwind_frame(struct task_struct *tsk,
67+
struct stackframe *frame)
6768
{
6869
unsigned long fp = frame->fp;
6970
struct stack_info info;
@@ -141,8 +142,9 @@ int notrace unwind_frame(struct task_struct *tsk, struct stackframe *frame)
141142
}
142143
NOKPROBE_SYMBOL(unwind_frame);
143144

144-
void notrace walk_stackframe(struct task_struct *tsk, struct stackframe *frame,
145-
bool (*fn)(void *, unsigned long), void *data)
145+
static void notrace walk_stackframe(struct task_struct *tsk,
146+
struct stackframe *frame,
147+
bool (*fn)(void *, unsigned long), void *data)
146148
{
147149
while (1) {
148150
int ret;

0 commit comments

Comments
 (0)