Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp797457imm; Fri, 28 Sep 2018 07:02:33 -0700 (PDT) X-Google-Smtp-Source: ACcGV62N7I7aptjwg83SvxcxW47EpuHiCZPn64mPXZI6/gs/AJwZtx7BGuREvH8SLvbSe1GWVq5V X-Received: by 2002:a63:dc41:: with SMTP id f1-v6mr14572852pgj.214.1538143353267; Fri, 28 Sep 2018 07:02:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538143353; cv=none; d=google.com; s=arc-20160816; b=zSSg4rRa6hKUrEtfRHBl2h2VQmSEMPYgeR0ZTUkIfWzX8vU5VPECfHRGKvr5aHixOn riLpSNdr2iFSrzruRG6/dgB+TEBaTbK76Fjdy/ZJnHrqYxhrXO1TqJGwIn2+7D/IBujR rTPKFujd6YooRFPp/4je7AI2Wscl+c3l+0CsOfAN/cPH1Wm9cNWq47bJJRo9rHvY3eag dL0ICFOONptYnlsd3el+bO2RAnBHDrdPmUjYtcwrMfdzNR9SM10FP75VqCdKzB6bolaR fSosXbHy6Cy6bDGdiA6pAPgup2RGW2g053XT+0NQYYlKY7h5pLvQQhyk/kADe1Pmf2zT tTTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=rKFLrkCv+gbHoImQ2RhC7U5iltA5KG+DPBFs88QC65I=; b=wc3ME1fM4GllS9nUieSmEfowwzLd5lRg02oy2FiYcHW/gekxn0UTJVI7w7uYApmvyS LYQtX1amMfGHtQwhAJdVGTJugF5F82d08A+10vGx55W+S+ulqHuYMk6dpG/KvK0eXPs8 /nBpPq04c1ijaUiG8AFSwqAlHKoQ8OKLm6XasUFDS/MPufW8OSEv+D2uy9j6LOvhUefk t1GXNiRKCtzWT7xrK+WjCEI8Nh1KVyc0qIy3I41Cm4WXe2+C8qyzQoXWloso2AMOMJfE 2MBq8BU0utU9qsk/u51dp0jrZTqSnFOq3NG9uWlKn1mdz5hRb71OV+6J31pz8Ww2TTcK oTlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b="aX2x/F//"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t80-v6si5087613pfk.228.2018.09.28.07.02.16; Fri, 28 Sep 2018 07:02:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b="aX2x/F//"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729311AbeI1UZs (ORCPT + 99 others); Fri, 28 Sep 2018 16:25:48 -0400 Received: from frisell.zx2c4.com ([192.95.5.64]:36815 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726971AbeI1UZr (ORCPT ); Fri, 28 Sep 2018 16:25:47 -0400 Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 2e726d46; Fri, 28 Sep 2018 13:43:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=zx2c4.com; h=mime-version :references:in-reply-to:from:date:message-id:subject:to:cc :content-type; s=mail; bh=xri/HvHpWJvl4xOiPMBgOOsqXhU=; b=aX2x/F //1ijGD9OAo5VSQ/oTskgbxR1+pbLNx/4AY9E+R5/p7oGUUEpz91dCdnFFLARC1f Ml2KG2CkpYSY+0NGpjekWvDufRvE2UGbJq9AqToO+6JXEefAsDbjU9JpWBCayAXJ AGs0GhNjlJTkmEnKxLMN4975TIMCFOnJ2Pvry0azpzbdV05+/2Cvn5LbNz+mvPli Lkq+VdSkJDxE79q9cpFC736/iOzY2tkWQtxrjypXZiqrLMtMXR62cSu/2nc/XiW6 I0UWhDRdypTtx+RbRrVV6ZcLs8EH2sImneFEqh4uwwU86ol0+U4gvRcD2JA6EUVB 5cok2P6adL7bRL8w== Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 28596e47 (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128:NO); Fri, 28 Sep 2018 13:43:02 +0000 (UTC) Received: by mail-ot1-f50.google.com with SMTP id o13-v6so6126790otl.4; Fri, 28 Sep 2018 07:01:49 -0700 (PDT) X-Gm-Message-State: ABuFfoitDwnnngaqeUrMchEvaKJafw9FdxcMEA37/tV7ihHaRY7CZBPD UvDDQaK4u4Whyja61CLoI/Hirg/pHUqWnmjxnXU= X-Received: by 2002:a9d:1719:: with SMTP id i25-v6mr9566734ota.223.1538143309237; Fri, 28 Sep 2018 07:01:49 -0700 (PDT) MIME-Version: 1.0 References: <20180925145622.29959-1-Jason@zx2c4.com> <20180925145622.29959-2-Jason@zx2c4.com> In-Reply-To: From: "Jason A. Donenfeld" Date: Fri, 28 Sep 2018 16:01:37 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH net-next v6 01/23] asm: simd context helper API To: Ard Biesheuvel Cc: Joe Perches , LKML , Netdev , Linux Crypto Mailing List , David Miller , Greg Kroah-Hartman , Samuel Neves , Andrew Lutomirski , Thomas Gleixner , linux-arch@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 28, 2018 at 4:00 PM Ard Biesheuvel wrote: > > On 28 September 2018 at 15:59, Jason A. Donenfeld wrote: > > On Fri, Sep 28, 2018 at 3:58 PM Ard Biesheuvel > > wrote: > >> > >> On 28 September 2018 at 15:47, Jason A. Donenfeld wrote: > >> > On Fri, Sep 28, 2018 at 10:49 AM Ard Biesheuvel > >> > wrote: > >> >> >> +typedef enum { > >> >> >> + HAVE_NO_SIMD = 1 << 0, > >> >> >> + HAVE_FULL_SIMD = 1 << 1, > >> >> >> + HAVE_SIMD_IN_USE = 1 << 31 > >> >> >> +} simd_context_t; > >> >> >> + > >> >> > >> >> Oh, and another thing (and I'm surprised checkpatch.pl didn't complain > >> >> about it): the use of typedef in new code is strongly discouraged. > >> >> This policy predates my involvement, so perhaps Joe can elaborate on > >> >> the rationale? > >> > > >> > In case it matters, the motivation for making this a typedef is I > >> > could imagine this at some point turning into a more complicated > >> > struct on certain platforms and that would make refactoring easier. I > >> > could just make it `struct simd_context` now with 1 member though... > >> > >> Yes that makes sense > > > > The rationale for it being a typedef or moving to a struct now? > > Yes just switch to a struct. Okay. No problem with that, but will wait to hear from Joe first.