summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hughes <tomhughes@chromium.org>2022-03-28 15:03:40 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-04-01 21:33:40 +0000
commitcaf06d733d84975a91eb5b331678be04b5ac18aa (patch)
tree1bbe1ddfde4106371e0356c19a33f5a69b2549b4
parent8ee87c53ab4a8ebbffbbcba7950a07da946ab509 (diff)
downloadchrome-ec-caf06d733d84975a91eb5b331678be04b5ac18aa.tar.gz
tree: Add __keep to all core irq handler routines
When using LTO, we want to avoid having the IRQ handler optimized out. __keep was already added for several of the cores (e.g., https://crrev.com/c/271291), but this adds it to the remaining ones for consistency. BRANCH=none BUG=b:172020503 TEST=./util/compare_build.sh -b all -j 120 => MATCH Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I2f96266d6ea04b13f7ee8a83e56b2ac2c1e6798f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3556498 Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r--core/cortex-m0/irq_handler.h2
-rw-r--r--core/host/irq_handler.h2
-rw-r--r--core/nds32/irq_handler.h2
-rw-r--r--core/riscv-rv32i/irq_handler.h2
4 files changed, 4 insertions, 4 deletions
diff --git a/core/cortex-m0/irq_handler.h b/core/cortex-m0/irq_handler.h
index e528717420..302befe7a6 100644
--- a/core/cortex-m0/irq_handler.h
+++ b/core/cortex-m0/irq_handler.h
@@ -35,7 +35,7 @@
#else /* CONFIG_TASK_PROFILING */
/* No Profiling : connect directly the IRQ vector */
#define DECLARE_IRQ_(irq, routine, priority) \
- static void routine(void); \
+ static void __keep routine(void); \
void IRQ_HANDLER(irq)(void) __attribute__((alias(STRINGIFY(routine))));\
const struct irq_priority __keep IRQ_PRIORITY(irq) \
__attribute__((section(".rodata.irqprio"))) \
diff --git a/core/host/irq_handler.h b/core/host/irq_handler.h
index 3947046f8c..17e3df52d9 100644
--- a/core/host/irq_handler.h
+++ b/core/host/irq_handler.h
@@ -16,7 +16,7 @@
* ensure it is enabled in the interrupt controller with the right priority.
*/
#define DECLARE_IRQ(irq, routine, priority) \
- static void routine(void); \
+ static void __keep routine(void); \
void IRQ_HANDLER(irq)(void) \
{ \
void *ret = __builtin_return_address(0); \
diff --git a/core/nds32/irq_handler.h b/core/nds32/irq_handler.h
index 7f679fa57e..7e404b5d0c 100644
--- a/core/nds32/irq_handler.h
+++ b/core/nds32/irq_handler.h
@@ -16,7 +16,7 @@
* ensure it is enabled in the interrupt controller with the right priority.
*/
#define DECLARE_IRQ(irq, routine, priority) \
- static void routine(void); \
+ static void __keep routine(void); \
void IRQ_HANDLER(CPU_INT(irq))(void) \
__attribute__ ((alias(STRINGIFY(routine)))); \
const struct irq_priority __keep IRQ_PRIORITY(CPU_INT(irq)) \
diff --git a/core/riscv-rv32i/irq_handler.h b/core/riscv-rv32i/irq_handler.h
index b6f9a222ef..6fe7769684 100644
--- a/core/riscv-rv32i/irq_handler.h
+++ b/core/riscv-rv32i/irq_handler.h
@@ -21,7 +21,7 @@
* ensure it is enabled in the interrupt controller with the right priority.
*/
#define DECLARE_IRQ(irq, routine, priority) \
- static void routine(void); \
+ static void __keep routine(void); \
void IRQ_HANDLER(CPU_INT(irq))(void) \
__attribute__ ((alias(STRINGIFY(routine)))); \
const struct irq_priority __keep IRQ_PRIORITY(CPU_INT(irq)) \