Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xtensa: hw_breakpoint: include header for missing prototype

Add the prototype for restore_dbreak() to <asm/hw_breakpoint.h> and use
that header in hw_breakpoint.c to prevent a build warning:

arch/xtensa/kernel/hw_breakpoint.c:263:6: warning: no previous prototype for 'restore_dbreak' [-Wmissing-prototypes]
263 | void restore_dbreak(void)

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Message-Id: <20230920052139.10570-12-rdunlap@infradead.org>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>

authored by

Randy Dunlap and committed by
Max Filippov
2e413b1e 0f95df62

+2
+1
arch/xtensa/include/asm/hw_breakpoint.h
··· 48 48 void hw_breakpoint_pmu_read(struct perf_event *bp); 49 49 int check_hw_breakpoint(struct pt_regs *regs); 50 50 void clear_ptrace_hw_breakpoint(struct task_struct *tsk); 51 + void restore_dbreak(void); 51 52 52 53 #else 53 54
+1
arch/xtensa/kernel/hw_breakpoint.c
··· 13 13 #include <linux/percpu.h> 14 14 #include <linux/perf_event.h> 15 15 #include <asm/core.h> 16 + #include <asm/hw_breakpoint.h> 16 17 17 18 /* Breakpoint currently in use for each IBREAKA. */ 18 19 static DEFINE_PER_CPU(struct perf_event *, bp_on_reg[XCHAL_NUM_IBREAK]);