From: George Spelvin <lkml@sdf•org>
To: heiko.carstens@de•ibm.com, lkml@sdf•org
Cc: linux-s390@vger•kernel.org, linuxppc-dev@lists•ozlabs.org,
linux-mips@vger•kernel.org, linux-alpha@vger•kernel.org
Subject: Re: CONFIG_ARCH_SUPPORTS_INT128: Why not mips, s390, powerpc, and alpha?
Date: Sat, 30 Mar 2019 10:30:23 GMT [thread overview]
Message-ID: <201903301030.x2UAUNOg026448@sdf.org> (raw)
In-Reply-To: <20190330084346.GA3801@osiris>
On Sat, 30 Mar 2019 at 09:43:47 +0100, Heiko Carstens wrote:
> It hasn't been enabled on s390 simply because at least I wasn't aware
> of this config option. Feel free to send a patch, otherwise I will
> enable this. Whatever you prefer.
>
> Thanks for pointing this out!
Here's a draft patch, but obviously it should be tested!
From 6f3cc608c49dba33a38e81232a2fd46e8fa8dbcd Mon Sep 17 00:00:00 2001
From: George Spelvin <lkml@sdf•org>
Date: Sat, 30 Mar 2019 10:27:14 +0000
Subject: [PATCH] s390: Enable CONFIG_ARCH_SUPPORTS_INT128 on 64-bit builds
If a platform supports a 64x64->128-bit widening multiply,
that allows more efficient scaling of 64-bit values in various
parts of the kernel. GCC advertises __int128 support with the
__INT128__ #define, but we care about efficient inline
support, so this is a separate flag.
For s390, that was added on 24 March 2017 by
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=246457
which is part of GCC 7.
It also only applies to TARGET_ARCH12, which I am guessing
corresponds to HAVE_MARCH_ZEC12_FEATURES. clang support is
pure guesswork.
Signed-off-by: George Spelvin <lkml@sdf•org>
---
arch/s390/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index ed554b09eb3f..43e6dc677f7d 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -372,6 +372,7 @@ endchoice
config 64BIT
def_bool y
+ select ARCH_SUPPORTS_INT128 if GCC_VERSION >= 70000 && HAVE_MARCH_ZEC12_FEATURES || CC_IS_CLANG
config COMPAT
def_bool y
--
2.20.1
next prev parent reply other threads:[~2019-03-30 10:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-29 13:07 CONFIG_ARCH_SUPPORTS_INT128: Why not mips, s390, powerpc, and alpha? George Spelvin
2019-03-29 20:00 ` Michael Cree
2019-03-30 23:14 ` Segher Boessenkool
2019-03-29 20:25 ` Segher Boessenkool
2019-03-30 11:28 ` George Spelvin
2019-03-30 23:52 ` Segher Boessenkool
2019-03-30 8:43 ` Heiko Carstens
2019-03-30 10:30 ` George Spelvin [this message]
2019-03-30 13:00 ` George Spelvin
2019-03-31 0:30 ` Segher Boessenkool
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=201903301030.x2UAUNOg026448@sdf.org \
--to=lkml@sdf$(echo .)org \
--cc=heiko.carstens@de$(echo .)ibm.com \
--cc=linux-alpha@vger$(echo .)kernel.org \
--cc=linux-mips@vger$(echo .)kernel.org \
--cc=linux-s390@vger$(echo .)kernel.org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.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