summaryrefslogtreecommitdiff
path: root/services/std_svc/sdei/sdei_intr_mgmt.c
diff options
context:
space:
mode:
authorAntonio Nino Diaz <antonio.ninodiaz@arm.com>2019-02-08 13:10:45 +0000
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>2019-02-08 13:42:38 +0000
commite05663051671bdec38056a2da5ddebd390b4abca (patch)
tree3371718c3add99e403f96db4e19fbed348ff26f2 /services/std_svc/sdei/sdei_intr_mgmt.c
parent30490b15fef50900acac0f23a528651c24759e7d (diff)
Make setjmp.h prototypes comply with the C standard
Instead of having a custom implementation of setjmp() and longjmp() it is better to follow the C standard. The comments in setjmp.h are no longer needed as there are no deviations from the expected one, so they have been removed. All SDEI code that relied on them has been fixed to use the new function prototypes and structs. Change-Id: I6cd2e21cb5a5bcf81ba12283f2e4c067bd5172ca Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'services/std_svc/sdei/sdei_intr_mgmt.c')
-rw-r--r--services/std_svc/sdei/sdei_intr_mgmt.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/services/std_svc/sdei/sdei_intr_mgmt.c b/services/std_svc/sdei/sdei_intr_mgmt.c
index b8799cd4..fa1d3d28 100644
--- a/services/std_svc/sdei/sdei_intr_mgmt.c
+++ b/services/std_svc/sdei/sdei_intr_mgmt.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -31,7 +31,7 @@
typedef struct sdei_dispatch_context {
sdei_ev_map_t *map;
uint64_t x[SDEI_SAVED_GPREGS];
- struct jmpbuf *dispatch_jmp;
+ jmp_buf *dispatch_jmp;
/* Exception state registers */
uint64_t elr_el3;
@@ -236,7 +236,7 @@ static cpu_context_t *restore_and_resume_ns_context(void)
* SDEI client.
*/
static void setup_ns_dispatch(sdei_ev_map_t *map, sdei_entry_t *se,
- cpu_context_t *ctx, struct jmpbuf *dispatch_jmp)
+ cpu_context_t *ctx, jmp_buf *dispatch_jmp)
{
sdei_dispatch_context_t *disp_ctx;
@@ -347,7 +347,7 @@ int sdei_intr_handler(uint32_t intr_raw, uint32_t flags, void *handle,
unsigned int sec_state;
sdei_cpu_state_t *state;
uint32_t intr;
- struct jmpbuf dispatch_jmp;
+ jmp_buf dispatch_jmp;
const uint64_t mpidr = read_mpidr_el1();
/*
@@ -529,7 +529,7 @@ int sdei_dispatch_event(int ev_num)
cpu_context_t *ns_ctx;
sdei_dispatch_context_t *disp_ctx;
sdei_cpu_state_t *state;
- struct jmpbuf dispatch_jmp;
+ jmp_buf dispatch_jmp;
/* Can't dispatch if events are masked on this PE */
state = sdei_get_this_pe_state();
@@ -595,9 +595,9 @@ int sdei_dispatch_event(int ev_num)
return 0;
}
-static void end_sdei_synchronous_dispatch(struct jmpbuf *buffer)
+static void end_sdei_synchronous_dispatch(jmp_buf *buffer)
{
- longjmp(buffer);
+ longjmp(*buffer, 1);
}
int sdei_event_complete(bool resume, uint64_t pc)