This is an automated email from the ASF dual-hosted git repository.
xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new bdb45fb2373 arch/arm64: Make panic switch registration static
bdb45fb2373 is described below
commit bdb45fb237374e7c7990f37f83fac3ce8b0de78b
Author: hujun5 <[email protected]>
AuthorDate: Mon Nov 30 08:55:38 2026 +0800
arch/arm64: Make panic switch registration static
Make panic switch registration static
Signed-off-by: hujun5 <[email protected]>
---
arch/arm64/src/common/arm64_initialize.c | 4 +++-
arch/arm64/src/common/arm64_internal.h | 6 ------
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/arch/arm64/src/common/arm64_initialize.c
b/arch/arm64/src/common/arm64_initialize.c
index ff4e7b07eb8..2d38dad3cd5 100644
--- a/arch/arm64/src/common/arm64_initialize.c
+++ b/arch/arm64/src/common/arm64_initialize.c
@@ -136,7 +136,7 @@ static int arm64_panic_switch_nsec(struct notifier_block
*block,
*
****************************************************************************/
-void arm64_panic_switch_nsec_register(void)
+static void arm64_panic_switch_nsec_register(void)
{
g_panic_switch_nsec_nb.notifier_call = arm64_panic_switch_nsec;
g_panic_switch_nsec_nb.priority = INT_MIN;
@@ -228,5 +228,7 @@ void up_initialize(void)
* secure-world crash, so the REE can finish coredump / recovery.
*/
+#ifdef CONFIG_ARCH_TRUSTZONE_SECURE
arm64_panic_switch_nsec_register();
+#endif
}
diff --git a/arch/arm64/src/common/arm64_internal.h
b/arch/arm64/src/common/arm64_internal.h
index b1c21687e6f..9674860624a 100644
--- a/arch/arm64/src/common/arm64_internal.h
+++ b/arch/arm64/src/common/arm64_internal.h
@@ -389,12 +389,6 @@ void arm64_stack_color(void *stackbase, size_t nbytes);
int arm64_enable_dbgmonitor(void);
#endif
-#ifdef CONFIG_ARCH_TRUSTZONE_SECURE
-void arm64_panic_switch_nsec_register(void);
-#else
-# define arm64_panic_switch_nsec_register()
-#endif
-
#ifdef CONFIG_SMP
void arm64_timer_secondary_init(void);
#endif