event/octeontx: fix build with clang 6
authorPavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Tue, 8 May 2018 21:26:00 +0000 (02:56 +0530)
committerJerin Jacob <jerin.jacob@caviumnetworks.com>
Thu, 10 May 2018 12:03:12 +0000 (14:03 +0200)
commit55fbc92d7800100628579643c9ee2770614fef10
tree99728f9a68fd724952f6de6c9b6a06fdda59bf7b
parent8ea41438832a360aed2b7ba49fb75e310a2ff1dc
event/octeontx: fix build with clang 6

Clang 6 & 7 fail to naturally align packed structs due to this clang
can't use 8byte atomic primitives and splits them into lesser atomic
primitives. To use lesser atomic primitives we need to link libatomic
(-latomic), instead supply alignment attribute to the compiler.

timvf_worker.c:(.text+0x498): undefined reference to `__atomic_fetch_add_8'
timvf_worker.c:(.text+0x525): undefined reference to `__atomic_store_2'
timvf_worker.c:(.text+0x557): undefined reference to `__atomic_fetch_add_4'
timvf_worker.c:(.text+0x5de): undefined reference to `__atomic_store_2'

Fixes: f874c1eb1519 ("event/octeontx: create and free timer adapter")

Reported-by: Andrew Rybchenko <arybchenko@solarflare.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
drivers/event/octeontx/timvf_evdev.h