summaryrefslogtreecommitdiff
path: root/core/nds32/irq_handler.h
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2016-08-05 00:03:14 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-08-07 21:43:53 -0700
commit1fac91707184ef5466148e5dbc3418704475e488 (patch)
treeb9c05e60404cc8ebe2bf198e826b7e0aa5e5692b /core/nds32/irq_handler.h
parenta9b4ae1f5a9fd3ada8709d0d39e6f694bf8f6423 (diff)
downloadchrome-ec-1fac91707184ef5466148e5dbc3418704475e488.tar.gz
core: Don't discard irqprio table entries due to LTO
Add __keep attribute to irqprio entries to ensure they are not dropped when CONFIG_LTO is enabled. BUG=chrome-os-partner:55920 BRANCH=None TEST=Manual on kevin. Check build/RO/ec.RO.map, verify that .rodata.irqprio section is not empty. Change-Id: I51ae23556d6f46b2cd7ba098f0e7a785292b2853 Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/366571 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'core/nds32/irq_handler.h')
-rw-r--r--core/nds32/irq_handler.h10
1 files changed, 5 insertions, 5 deletions
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 */