diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/cortex-m/irq_handler.h | 2 | ||||
-rw-r--r-- | core/cortex-m0/irq_handler.h | 4 | ||||
-rw-r--r-- | core/host/irq_handler.h | 2 | ||||
-rw-r--r-- | core/nds32/irq_handler.h | 10 |
4 files changed, 9 insertions, 9 deletions
diff --git a/core/cortex-m/irq_handler.h b/core/cortex-m/irq_handler.h index c309b48102..95218281e9 100644 --- a/core/cortex-m/irq_handler.h +++ b/core/cortex-m/irq_handler.h @@ -38,7 +38,7 @@ "b task_resched_if_needed\n" \ ); \ } \ - const struct irq_priority IRQ_PRIORITY(irq) \ + const struct irq_priority __keep IRQ_PRIORITY(irq) \ __attribute__((section(".rodata.irqprio"))) \ = {irq, priority} #endif /* __CROS_EC_IRQ_HANDLER_H */ diff --git a/core/cortex-m0/irq_handler.h b/core/cortex-m0/irq_handler.h index 7acf640c02..22a72ebf98 100644 --- a/core/cortex-m0/irq_handler.h +++ b/core/cortex-m0/irq_handler.h @@ -28,14 +28,14 @@ routine(); \ task_end_irq_handler(ret); \ } \ - const struct irq_priority IRQ_PRIORITY(irq) \ + const struct irq_priority __keep IRQ_PRIORITY(irq) \ __attribute__((section(".rodata.irqprio"))) \ = {irq, priority} #else /* CONFIG_TASK_PROFILING */ /* No Profiling : connect directly the IRQ vector */ #define DECLARE_IRQ_(irq, routine, priority) \ void IRQ_HANDLER(irq)(void) __attribute__((alias(STRINGIFY(routine))));\ - const struct irq_priority IRQ_PRIORITY(irq) \ + const struct irq_priority __keep IRQ_PRIORITY(irq) \ __attribute__((section(".rodata.irqprio"))) \ = {irq, priority} #endif /* CONFIG_TASK_PROFILING */ diff --git a/core/host/irq_handler.h b/core/host/irq_handler.h index 738d28cbeb..6d37020175 100644 --- a/core/host/irq_handler.h +++ b/core/host/irq_handler.h @@ -23,7 +23,7 @@ routine(); \ task_resched_if_needed(ret); \ } \ - const struct irq_priority IRQ_PRIORITY(irq) \ + const struct irq_priority __keep IRQ_PRIORITY(irq) \ __attribute__((section(".rodata.irqprio"))) \ = {irq, priority} #endif /* __CROS_EC_IRQ_HANDLER_H */ diff --git a/core/nds32/irq_handler.h b/core/nds32/irq_handler.h index 2cf10256a0..efe3984957 100644 --- a/core/nds32/irq_handler.h +++ b/core/nds32/irq_handler.h @@ -15,11 +15,11 @@ * Macro to connect the interrupt handler "routine" to the irq number "irq" and * ensure it is enabled in the interrupt controller with the right priority. */ -#define DECLARE_IRQ(irq, routine, priority) \ - void IRQ_HANDLER(CPU_INT(irq))(void) \ - __attribute__ ((alias(STRINGIFY(routine)))); \ - const struct irq_priority IRQ_PRIORITY(CPU_INT(irq)) \ - __attribute__((section(".rodata.irqprio"))) \ +#define DECLARE_IRQ(irq, routine, priority) \ + void IRQ_HANDLER(CPU_INT(irq))(void) \ + __attribute__ ((alias(STRINGIFY(routine)))); \ + const struct irq_priority __keep IRQ_PRIORITY(CPU_INT(irq)) \ + __attribute__((section(".rodata.irqprio"))) \ = {CPU_INT(irq), priority} #endif /* __CROS_EC_IRQ_HANDLER_H */ |