diff options
author | Tom Hughes <tomhughes@chromium.org> | 2021-09-23 22:28:52 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-09-27 22:23:36 +0000 |
commit | dcd24535cf751fcdaa7c5f025c2e54705e4053f3 (patch) | |
tree | 0e79b571406664ce43d3136353fcb78c52baa6ea /chip/mt_scp/mt8183/ipi.c | |
parent | 0c596a170a880579cef9c5beacaa1679a23c5cf2 (diff) | |
download | chrome-ec-dcd24535cf751fcdaa7c5f025c2e54705e4053f3.tar.gz |
chip/mt_scp: Declaration needs to come before definition
We are already disabling -Wignored-attributes to work around the
declaration and definition order issue:
error: attribute declaration must precede
definition [-Werror,-Wignored-attributes]
However, although there are no compiler errors, the linker (lld) will
still fail:
ld.lld: error: undefined symbol: clock_control_irq
>>> referenced by clock.c:347
(src/platform/ec/chip/mt_scp/mt8183/clock.c:347)
>>> lto.tmp:(irq_13_handler)
...
ld.lld: error: undefined symbol: clock_fast_wakeup_irq
>>> referenced by clock.c:355
(src/platform/ec/chip/mt_scp/mt8183/clock.c:355)
>>> lto.tmp:(irq_44_handler)
Tested with the compare_build.sh script to validate that the resulting
binaries are identical.
BRANCH=none
BUG=b:172020503
TEST=CC=arm-none-eabi-clang make BOARD=kukui_scp -j
TEST=./util/compare_build.sh --boards all -j 50
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: Ib622fb98784a4c3ad3c199c72ee7604c7f709d6c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3182621
Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'chip/mt_scp/mt8183/ipi.c')
-rw-r--r-- | chip/mt_scp/mt8183/ipi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chip/mt_scp/mt8183/ipi.c b/chip/mt_scp/mt8183/ipi.c index e6a79fca9a..8e13781db3 100644 --- a/chip/mt_scp/mt8183/ipi.c +++ b/chip/mt_scp/mt8183/ipi.c @@ -381,6 +381,7 @@ static void ipi_init(void) } DECLARE_HOOK(HOOK_INIT, ipi_init, HOOK_PRIO_DEFAULT); +DECLARE_IRQ(SCP_IRQ_IPC0, ipc_handler, 4); void ipc_handler(void) { /* TODO(b/117917141): We only support IPC_ID(0) for now. */ @@ -391,4 +392,3 @@ void ipc_handler(void) SCP_GIPC_IN &= (SCP_GPIC_IN_CLEAR_ALL & ~SCP_GIPC_IN_CLEAR_IPCN(0)); } -DECLARE_IRQ(SCP_IRQ_IPC0, ipc_handler, 4); |