public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: will.deacon@arm•com (Will Deacon)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] arm64: Add support ARCH_SUPPORTS_INT128
Date: Wed, 22 Jun 2016 13:43:23 +0100	[thread overview]
Message-ID: <20160622124323.GZ29165@arm.com> (raw)
In-Reply-To: <20160622105749.GA6521@e104818-lin.cambridge.arm.com>

On Wed, Jun 22, 2016 at 11:57:50AM +0100, Catalin Marinas wrote:
> On Tue, Jun 21, 2016 at 02:55:23PM +0800, Kefeng Wang wrote:
> > The gcc support __SIZEOF_INT128__ and __int128 in arm64, thus,
> > enable ARCH_SUPPORTS_INT128 to make mul_u64_u32_shr() a bit
> > more efficient in scheduler.
> > 
> > Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei•com>
> > ---
> >  arch/arm64/Kconfig | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> > index 5a0a691..ab319eb 100644
> > --- a/arch/arm64/Kconfig
> > +++ b/arch/arm64/Kconfig
> > @@ -11,6 +11,7 @@ config ARM64
> >  	select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
> >  	select ARCH_USE_CMPXCHG_LOCKREF
> >  	select ARCH_SUPPORTS_ATOMIC_RMW
> > +	select ARCH_SUPPORTS_INT128
> >  	select ARCH_SUPPORTS_NUMA_BALANCING
> >  	select ARCH_WANT_OPTIONAL_GPIOLIB
> >  	select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
> 
> With this patch and UBSAN+KASAN enabled, Linux fails to link with:
> 
> lib/built-in.o: In function `get_signed_val':
> lib/ubsan.c:93: undefined reference to `__ashlti3'
> lib/ubsan.c:93: undefined reference to `__ashrti3'
> 
> It succeeds if I revert commit d67703a8a69e ("arm64: kill off the libgcc
> dependency"). We may have to revisit that decision or implement the
> required library functions in the kernel. In general, I'd like to reduce
> the amount of code duplication if the functionality can be found
> elsewhere like in libgcc. There is a risk of not knowing precisely what
> ligbcc relies on (like libc functions), though there are other
> architectures linking against it.

Linking agianst libgcc is pretty scary if we're starting to use plugins
for the compiler[1], but IANAL.

Will

[1] https://lwn.net/Articles/691102/

  reply	other threads:[~2016-06-22 12:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-21  6:55 [PATCH] arm64: Add support ARCH_SUPPORTS_INT128 Kefeng Wang
2016-06-21 15:14 ` Catalin Marinas
2016-06-22 10:57 ` Catalin Marinas
2016-06-22 12:43   ` Will Deacon [this message]
2016-06-22 13:43     ` Catalin Marinas
2016-06-22 13:23   ` Ard Biesheuvel
2016-06-23  3:23   ` Kefeng Wang

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=20160622124323.GZ29165@arm.com \
    --to=will.deacon@arm$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox