Skip to content

Commit

Permalink
core: interrupt: rename itr_core_handler()
Browse files Browse the repository at this point in the history
Renames itr_core_handler() to interrupt_main_handler() as a later
change will modify interrupt chip API functions using interrupt_
as prefix.

Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
  • Loading branch information
etienne-lms authored and jforissier committed May 23, 2023
1 parent 0ee3f52 commit 358bf47
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion core/arch/arm/kernel/thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,7 @@ DECLARE_KEEP_PAGER(thread_system_reset_handler);
#endif /*CFG_WITH_ARM_TRUSTED_FW*/

#ifdef CFG_CORE_WORKAROUND_ARM_NMFI
void __noreturn itr_core_handler(void)
void __noreturn interrupt_main_handler(void)
{
/*
* Note: overrides the default implementation of this function so that
Expand Down
2 changes: 1 addition & 1 deletion core/arch/arm/kernel/thread_a32.S
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ END_FUNC thread_unwind_user_mode
.endif

bl thread_check_canaries
bl itr_core_handler
bl interrupt_main_handler

mrs r0, spsr
cmp_spsr_user_mode r0
Expand Down
2 changes: 1 addition & 1 deletion core/arch/arm/kernel/thread_a64.S
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,7 @@ END_FUNC el0_sync_abort
mov sp, x1

bl thread_check_canaries
bl itr_core_handler
bl interrupt_main_handler

/*
* Restore registers
Expand Down
2 changes: 1 addition & 1 deletion core/arch/arm/kernel/thread_optee_smc_a32.S
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ UNWIND( .cantunwind)
readjust_pc
/* Secure Monitor received a FIQ and passed control to us. */
bl thread_check_canaries
bl itr_core_handler
bl interrupt_main_handler
ldr r0, =TEESMC_OPTEED_RETURN_FIQ_DONE
smc #0
/* SMC should not return */
Expand Down
2 changes: 1 addition & 1 deletion core/arch/arm/kernel/thread_optee_smc_a64.S
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ LOCAL_FUNC vector_fiq_entry , : , .identity_map
readjust_pc
/* Secure Monitor received a FIQ and passed control to us. */
bl thread_check_canaries
bl itr_core_handler
bl interrupt_main_handler
ldr x0, =TEESMC_OPTEED_RETURN_FIQ_DONE
smc #0
/* SMC should not return */
Expand Down
2 changes: 1 addition & 1 deletion core/arch/arm/kernel/thread_spmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ void thread_spmc_msg_recv(struct thread_smc_args *args)
break;
#endif /*CFG_CORE_SEL1_SPMC*/
case FFA_INTERRUPT:
itr_core_handler();
interrupt_main_handler();
spmc_set_args(args, FFA_MSG_WAIT, 0, 0, 0, 0, 0);
break;
#ifdef ARM64
Expand Down
2 changes: 1 addition & 1 deletion core/drivers/atmel_saic.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static uint32_t saic_read_reg(uint32_t reg)
return io_read32(saic.base + reg);
}

void itr_core_handler(void)
void interrupt_main_handler(void)
{
uint32_t irqnr = saic_read_reg(AT91_AIC_IVR);

Expand Down
4 changes: 2 additions & 2 deletions core/drivers/gic.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,8 @@ static void __maybe_unused gic_native_itr_handler(void)
}

#ifndef CFG_CORE_WORKAROUND_ARM_NMFI
/* Override itr_core_handler() with core interrupt controller implementation */
void itr_core_handler(void)
/* Override interrupt_main_handler() with driver implementation */
void interrupt_main_handler(void)
{
gic_native_itr_handler();
}
Expand Down
4 changes: 2 additions & 2 deletions core/drivers/hfic.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ void hfic_init(void)
itr_init(&hfic_data.chip);
}

/* Override itr_core_handler() with core interrupt controller implementation */
void itr_core_handler(void)
/* Override interrupt_main_handler() with driver implementation */
void interrupt_main_handler(void)
{
uint32_t id = 0;
uint32_t res __maybe_unused = 0;
Expand Down
2 changes: 1 addition & 1 deletion core/include/kernel/interrupt.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void itr_set_affinity(size_t it, uint8_t cpu_mask);
* received. The default function calls panic() immediately, platforms which
* expects to receive secure interrupts should override this function.
*/
void itr_core_handler(void);
void interrupt_main_handler(void);

static inline void itr_add(struct itr_handler *handler)
{
Expand Down
2 changes: 1 addition & 1 deletion core/kernel/interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ void itr_set_affinity(size_t it, uint8_t cpu_mask)
}

/* This function is supposed to be overridden in platform specific code */
void __weak __noreturn itr_core_handler(void)
void __weak __noreturn interrupt_main_handler(void)
{
panic("Secure interrupt handler not defined");
}

0 comments on commit 358bf47

Please sign in to comment.