xtensa: move exception handling func to arch internal header

z_xtensa_dump_stack() and z_xtensa_exccause() are both arch
internal functions that should not be exposed in public API.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2023-12-06 16:22:52 -08:00 committed by Carles Cufí
commit 004e68ccea
4 changed files with 19 additions and 3 deletions

View file

@ -11,6 +11,9 @@
#include <xtensa_backtrace.h>
#include <zephyr/debug/coredump.h>
#include <zephyr/arch/common/exc_handle.h>
#include <xtensa_internal.h>
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL);

View file

@ -17,6 +17,8 @@
#include <zsr.h>
#include <zephyr/arch/common/exc_handle.h>
#include <xtensa_internal.h>
LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL);
extern char xtensa_arch_except_epc[];

View file

@ -0,0 +1,14 @@
/*
* Copyright (c) 2014 Wind River Systems, Inc.
* Copyright (c) 2016 Cadence Design Systems, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_ARCH_XTENSA_INCLUDE_XTENSA_INTERNAL_H_
#define ZEPHYR_ARCH_XTENSA_INCLUDE_XTENSA_INTERNAL_H_
void z_xtensa_dump_stack(const z_arch_esf_t *stack);
char *z_xtensa_exccause(unsigned int cause_code);
#endif /* ZEPHYR_ARCH_XTENSA_INCLUDE_XTENSA_INTERNAL_H_ */

View file

@ -27,9 +27,6 @@ extern "C" {
*/
typedef int z_arch_esf_t;
void z_xtensa_dump_stack(const z_arch_esf_t *stack);
char *z_xtensa_exccause(unsigned int cause_code);
#endif
#ifdef __cplusplus