From 51fc92e68e9fdba5657cf5fa4dfff1a63215220b Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Mon, 22 May 2023 14:38:08 +0100 Subject: [PATCH] Make some arm64 debug monitor functions static These are only used within debug_monitor.c so can become static. Sponsored by: Arm Ltd --- sys/arm64/arm64/debug_monitor.c | 9 +++++++-- sys/arm64/include/debug_monitor.h | 3 --- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/arm64/arm64/debug_monitor.c b/sys/arm64/arm64/debug_monitor.c index 52bcf1e5e603..be79f1184fe9 100644 --- a/sys/arm64/arm64/debug_monitor.c +++ b/sys/arm64/arm64/debug_monitor.c @@ -62,6 +62,11 @@ static struct debug_monitor_state kernel_monitor = { .dbg_flags = DBGMON_KERNEL }; +static int dbg_setup_watchpoint(struct debug_monitor_state *, vm_offset_t, + vm_size_t, enum dbg_access_t); +static int dbg_remove_watchpoint(struct debug_monitor_state *, vm_offset_t, + vm_size_t); + /* Called from the exception handlers */ void dbg_monitor_enter(struct thread *); void dbg_monitor_exit(struct thread *, struct trapframe *); @@ -380,7 +385,7 @@ dbg_find_slot(struct debug_monitor_state *monitor, enum dbg_t type, return (-1); } -int +static int dbg_setup_watchpoint(struct debug_monitor_state *monitor, vm_offset_t addr, vm_size_t size, enum dbg_access_t access) { @@ -447,7 +452,7 @@ dbg_setup_watchpoint(struct debug_monitor_state *monitor, vm_offset_t addr, return (0); } -int +static int dbg_remove_watchpoint(struct debug_monitor_state *monitor, vm_offset_t addr, vm_size_t size) { diff --git a/sys/arm64/include/debug_monitor.h b/sys/arm64/include/debug_monitor.h index befc51e88304..22ed8b5f0e24 100644 --- a/sys/arm64/include/debug_monitor.h +++ b/sys/arm64/include/debug_monitor.h @@ -56,9 +56,6 @@ enum dbg_access_t { void dbg_monitor_init(void); void dbg_register_sync(struct debug_monitor_state *); -int dbg_setup_watchpoint(struct debug_monitor_state *, vm_offset_t, vm_size_t, - enum dbg_access_t); -int dbg_remove_watchpoint(struct debug_monitor_state *, vm_offset_t, vm_size_t); #ifdef DDB void dbg_show_watchpoint(void);