From 0ae4a3a3f0cd841b83f2944dde9837ea67f08813 Mon Sep 17 00:00:00 2001 From: Manish Pandey Date: Tue, 1 Nov 2022 16:16:55 +0000 Subject: fix(debug): decouple "get_el_str()" from backtrace get_el_str() was implemented under ENABLE_BACKTRACE macro but being used at generic places too, this causes multiple definition of this function. Remove duplicate definition of this function and move it out of backtrace scope. Also, this patch fixes a small bug where in default case S-EL1 is returned which ideally should be EL1, as there is no notion of security state in EL string. Signed-off-by: Manish Pandey Change-Id: Ib186ea03b776e2478eff556065449ebd478c3538 --- common/backtrace/backtrace.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'common') diff --git a/common/backtrace/backtrace.c b/common/backtrace/backtrace.c index 89380b3e4..f994ae5b6 100644 --- a/common/backtrace/backtrace.c +++ b/common/backtrace/backtrace.c @@ -54,17 +54,6 @@ static inline uintptr_t extract_address(uintptr_t address) return ret; } -const char *get_el_str(unsigned int el) -{ - if (el == 3U) { - return "EL3"; - } else if (el == 2U) { - return "EL2"; - } else { - return "S-EL1"; - } -} - /* * Returns true if the address points to a virtual address that can be read at * the current EL, false otherwise. -- cgit v1.2.1