summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/cortex-m0/panic-internal.h4
-rw-r--r--core/minute-ia/interrupts.c6
-rw-r--r--core/minute-ia/mia_panic_internal.h2
-rw-r--r--core/minute-ia/panic.c2
4 files changed, 8 insertions, 6 deletions
diff --git a/core/cortex-m0/panic-internal.h b/core/cortex-m0/panic-internal.h
index e32db54320..51c12f65b2 100644
--- a/core/cortex-m0/panic-internal.h
+++ b/core/cortex-m0/panic-internal.h
@@ -6,6 +6,8 @@
#ifndef __CROS_EC_PANIC_INTERNAL_H
#define __CROS_EC_PANIC_INTERNAL_H
-void exception_panic(void) __attribute__((noreturn, naked));
+#include <stdnoreturn.h>
+
+noreturn void exception_panic(void) __attribute__((naked));
#endif /* __CROS_EC_PANIC_INTERNAL_H */
diff --git a/core/minute-ia/interrupts.c b/core/minute-ia/interrupts.c
index cb79eb119b..2d55d3129e 100644
--- a/core/minute-ia/interrupts.c
+++ b/core/minute-ia/interrupts.c
@@ -183,7 +183,7 @@ static const irq_desc_t system_irqs[] = {
_DEFINE_EXN_HANDLER(vector, exception_panic_##vector)
#define _DEFINE_EXN_HANDLER(vector, name) \
void __keep name(void); \
- __attribute__((noreturn)) void name(void) \
+ noreturn void name(void) \
{ \
__asm__ ("push $0\n" \
"push $" #vector "\n" \
@@ -195,7 +195,7 @@ static const irq_desc_t system_irqs[] = {
_DEFINE_EXN_HANDLER_W_ERRORCODE(vector, exception_panic_##vector)
#define _DEFINE_EXN_HANDLER_W_ERRORCODE(vector, name) \
void __keep name(void); \
- __attribute__((noreturn)) void name(void) \
+ noreturn void name(void) \
{ \
__asm__ ("push $" #vector "\n" \
"call exception_panic\n"); \
@@ -228,7 +228,7 @@ DEFINE_EXN_HANDLER(20);
* watchdog timer expiration. However, this time, hardware does not
* push errorcode, and we must account for that by pushing zero.
*/
-__attribute__((noreturn)) __keep
+noreturn __keep
void exception_panic_wdt(uint32_t cs)
{
exception_panic(
diff --git a/core/minute-ia/mia_panic_internal.h b/core/minute-ia/mia_panic_internal.h
index e4d3aa0cdd..748ccbf2dd 100644
--- a/core/minute-ia/mia_panic_internal.h
+++ b/core/minute-ia/mia_panic_internal.h
@@ -8,7 +8,7 @@
* convenientely in the same order as pushed by hardwared during a
* processor exception.
*/
-__attribute__((noreturn))
+noreturn
void exception_panic(
uint32_t vector,
uint32_t errorcode,
diff --git a/core/minute-ia/panic.c b/core/minute-ia/panic.c
index cbdabc3eec..ba3d895c08 100644
--- a/core/minute-ia/panic.c
+++ b/core/minute-ia/panic.c
@@ -171,7 +171,7 @@ void exception_panic(
__builtin_unreachable();
}
-__attribute__((noreturn))
+noreturn
void software_panic(uint32_t reason, uint32_t info)
{
uint16_t code_segment;