From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753087AbdJaL5g (ORCPT ); Tue, 31 Oct 2017 07:57:36 -0400 Received: from frisell.zx2c4.com ([192.95.5.64]:40813 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753008AbdJaL5b (ORCPT ); Tue, 31 Oct 2017 07:57:31 -0400 X-Google-Smtp-Source: ABhQp+Q3ktip7254EF3Cjmi5DiY/irtkZM8ryjemOax9883vOgXXQ1PM+so8tNyjCN2XOe1TNLM3TIgA6G/aGoz4y2w= MIME-Version: 1.0 In-Reply-To: <20171031115156.GF5584@arm.com> References: <20171031114319.24436-1-Jason@zx2c4.com> <20171031115156.GF5584@arm.com> From: "Jason A. Donenfeld" Date: Tue, 31 Oct 2017 12:57:29 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] arm64: support __int128 on gcc 5+ To: Will Deacon Cc: linux-arm-kernel@lists.infradead.org, LKML , Mark Rutland Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Will, On Tue, Oct 31, 2017 at 12:51 PM, Will Deacon wrote: > Which code in the kernel actually uses 128-bit types directly? I know we > have some unfortunate occurences in our headers (including uapi) for the > vector registers, but I thought we generally used asm or copy routines to > access those. math64.h provides it, and various things throughout use those functions. Notably, the scheduler and kvm use those the __int128 functions. There's also an elliptic curve implementation that uses it, which makes a big difference. And soon I'll be adding an implementation of curve25519 that will make heavy use of these instructions for significant speedups as well. Generally, adding this CONFIG_ARCH key is a hint for current and future bits of code, so that they can use the faster 128-bit implementations when available. Not providing it when it's there and available would be silly. This wasn't originally added to the architecture, because when the Kconfig symbol was added, gcc didn't have sane support for it on aarch64. But now it does, so let's support it. Jason