All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Cc: santosh.shukla@caviumnetworks.com, arybchenko@solarflare.com,
	dev@dpdk.org
Subject: Re: [PATCH] event/octeontx: fix clang 6 linker error
Date: Wed, 9 May 2018 07:23:08 +0530	[thread overview]
Message-ID: <20180509015306.GA27146@jerin> (raw)
In-Reply-To: <20180508212600.26954-1-pbhagavatula@caviumnetworks.com>

-----Original Message-----
> Date: Wed,  9 May 2018 02:56:00 +0530
> From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> To: jerin.jacob@caviumnetworks.com, santosh.shukla@caviumnetworks.com,
>  arybchenko@solarflare.com
> Cc: dev@dpdk.org, Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> Subject: [dpdk-dev] [PATCH] event/octeontx: fix clang 6 linker error
> X-Mailer: git-send-email 2.17.0
> 
> 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 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/event/octeontx/timvf_evdev.h b/drivers/event/octeontx/timvf_evdev.h
> index b1b2a8464..1cac1e612 100644
> --- a/drivers/event/octeontx/timvf_evdev.h
> +++ b/drivers/event/octeontx/timvf_evdev.h
> @@ -145,7 +145,7 @@ struct tim_mem_bucket {
>  	};
>  	uint64_t current_chunk;
>  	uint64_t pad;
> -} __rte_packed;
> +} __rte_packed __rte_aligned(8);
> 
>  struct tim_mem_entry {
>  	uint64_t w0;
> --
> 2.17.0
> 

  reply	other threads:[~2018-05-09  1:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-08 21:26 [PATCH] event/octeontx: fix clang 6 linker error Pavan Nikhilesh
2018-05-09  1:53 ` Jerin Jacob [this message]
2018-05-09  9:09   ` Jerin Jacob

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180509015306.GA27146@jerin \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=pbhagavatula@caviumnetworks.com \
    --cc=santosh.shukla@caviumnetworks.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.