Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renamed _Fault to z_${ARCH}_fault #84535

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion arch/arc/core/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ static void dump_exception_info(uint32_t vector, uint32_t cause, uint32_t parame
* invokes the user provided routine k_sys_fatal_error_handler() which is
* responsible for implementing the error handling policy.
*/
void _Fault(struct arch_esf *esf, uint32_t old_sp)
void z_arc_fault(struct arch_esf *esf, uint32_t old_sp)
{
uint32_t vector, cause, parameter;
uint32_t exc_addr = z_arc_v2_aux_reg_read(_ARC_V2_EFA);
Expand Down
6 changes: 3 additions & 3 deletions arch/arc/core/fault_s.S
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <zephyr/syscall.h>
#include <zephyr/arch/arc/asm-compat/assembler.h>

GTEXT(_Fault)
GTEXT(z_arc_fault)
GTEXT(__reset)
GTEXT(__memory_error)
GTEXT(__instruction_error)
Expand Down Expand Up @@ -99,11 +99,11 @@ _exc_entry:

_save_exc_regs_into_stack

/* sp is parameter of _Fault */
/* sp is parameter of z_arc_fault */
MOVR r0, sp
/* ilink is the thread's original sp */
MOVR r1, ilink
jl _Fault
jl z_arc_fault

_exc_return:
/* the exception cause must be fixed in exception handler when exception returns
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/core/fatal.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static char *cause_str(unsigned long cause)
}
}

void _Fault(struct arch_esf *esf)
void z_mips_fault(struct arch_esf *esf)
{
unsigned long cause;

Expand Down
4 changes: 2 additions & 2 deletions arch/mips/core/isr.S
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
addi sp, sp, __struct_arch_esf_SIZEOF ;

/* imports */
GTEXT(_Fault)
GTEXT(z_mips_fault)

GTEXT(_k_neg_eagain)
GTEXT(z_thread_mark_switched_in)
Expand Down Expand Up @@ -125,7 +125,7 @@ SECTION_FUNC(exception.other, _mips_interrupt)

unhandled:
move a0, sp
jal _Fault
jal z_mips_fault
eret

is_kernel_syscall:
Expand Down
6 changes: 3 additions & 3 deletions arch/nios2/core/exception.S
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
GTEXT(_exception)

/* import */
GTEXT(_Fault)
GTEXT(z_nios2_fault)
GTEXT(arch_swap)
#ifdef CONFIG_IRQ_OFFLOAD
GTEXT(z_irq_do_offload)
Expand Down Expand Up @@ -171,12 +171,12 @@ not_interrupt:

_exception_enter_fault:
/* If we get here, the exception wasn't in interrupt or an
* invocation of irq_oflload(). Let _Fault() handle it in
* invocation of irq_offload(). Let z_nios2_fault() handle it in
* C domain
*/

mov r4, sp
call _Fault
call z_nios2_fault
jmpi _exception_exit

no_reschedule:
Expand Down
2 changes: 1 addition & 1 deletion arch/nios2/core/fatal.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ static char *cause_str(uint32_t cause_code)
}
#endif

FUNC_NORETURN void _Fault(const struct arch_esf *esf)
FUNC_NORETURN void z_nios2_fault(const struct arch_esf *esf)
{
#if defined(CONFIG_PRINTK) || defined(CONFIG_LOG)
/* Unfortunately, completely unavailable on Nios II/e cores */
Expand Down
2 changes: 1 addition & 1 deletion arch/riscv/core/fatal.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ static bool bad_stack_pointer(struct arch_esf *esf)
return false;
}

void _Fault(struct arch_esf *esf)
void z_riscv_fault(struct arch_esf *esf)
{
#ifdef CONFIG_USERSPACE
/*
Expand Down
12 changes: 6 additions & 6 deletions arch/riscv/core/isr.S
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ GDATA(_sw_isr_table)
GTEXT(__soc_is_irq)
#endif
GTEXT(__soc_handle_irq)
GTEXT(_Fault)
GTEXT(z_riscv_fault)
#ifdef CONFIG_RISCV_SOC_CONTEXT_SAVE
GTEXT(__soc_save_context)
GTEXT(__soc_restore_context)
Expand Down Expand Up @@ -336,7 +336,7 @@ no_fp: /* increment _current->arch.exception_depth */

/*
* If the exception is the result of an ECALL, check whether to
* perform a context-switch or an IRQ offload. Otherwise call _Fault
* perform a context-switch or an IRQ offload. Otherwise call z_riscv_fault
* to report the exception.
*/
csrr t0, mcause
Expand Down Expand Up @@ -375,15 +375,15 @@ no_fp: /* increment _current->arch.exception_depth */
#endif /* CONFIG_USERSPACE */

/*
* Call _Fault to handle exception.
* Call z_riscv_fault to handle exception.
* Stack pointer is pointing to a struct_arch_esf structure, pass it
* to _Fault (via register a0).
* If _Fault shall return, set return address to
* to z_riscv_fault (via register a0).
* If z_riscv_fault shall return, set return address to
* no_reschedule to restore stack.
*/
mv a0, sp
la ra, no_reschedule
tail _Fault
tail z_riscv_fault

is_kernel_syscall:
/*
Expand Down
Loading