Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4232998rdb; Thu, 14 Sep 2023 16:34:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHDzsKM0UPfpWRpwZoInjk9YAbd5/kGF00TxMOt2lpsN0m9txDheK1j/cJ2ZeDlcibs9i+/ X-Received: by 2002:a05:6a20:9703:b0:14d:446f:7212 with SMTP id hr3-20020a056a20970300b0014d446f7212mr213589pzc.46.1694734441874; Thu, 14 Sep 2023 16:34:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694734441; cv=none; d=google.com; s=arc-20160816; b=FDamabkcqM4sdACSyGLIWERRXpR7dQk5IbpOmv/GNCDYhbcMZbOZhaYTBpDn8FEtVQ gB6wKYtlu+mbYWqwdVN4T1qNUShHbi+tKH08PG/rftc5DetPHsO+Jt4989GY3mmSfAE7 7N7vnXSieuDDj5ACEDVAnZgtYCXLkpPYswESU+uds2Tv49l+VfGCbrsviOkdg7elFuup BZEW/A4apOpQ2hnJWvZAY/Zz7nJxwaQwF7vr0OGmrXuXIEKOYp/1B+KkVRnhezEaiztQ f30r+oix/qO1Sb9PhVxzckZ4V6Wnyn/s8dlapKpv0rPypfajjuuZFUBbhloKH1aj3nOO XjCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=L5Atq17mYlT6kG+rBiO4juTIlMt9CxnTqo+M16pkWhM=; fh=bvhDn24zxcLH387OvTNBXhWDApdnekjpaYVshFKRSYc=; b=gyCzxdlVuRVHnAgZyjqcDLLRz5m9GT5tzZnTK+ZD4/BU0yvfMdh1DViSenREP83zMk phnyHHEuNmSP4cg6v+lTQsPn//4sQQMgEDYb6P8DOfjx6YqjOSwyGCwPQVgtcCnLRcxN H11cv+X5pItQC4JTZmAivLuhkRHKMtLSVQt1SVV/MfJgTAomoge6KdU04ixQVnNi2W1N vBAxNUqEMiCHRExi9xlattfNAAxK35oQef5eZ9EB0yp80I/SqU7todGnWHjSEaq2AA8M IyNBAuCSOAsz/PdnImhKzkS8jHZP1vT6GBpC3tMXSBnv4GVkh6l0Vs4qrE6l2a4BVskG g3PA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=dEQQvojI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id by40-20020a056a0205a800b0056da0ae25a2si2534575pgb.32.2023.09.14.16.34.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 16:34:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=dEQQvojI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id DEE93802555B; Thu, 14 Sep 2023 16:31:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230454AbjINXbc (ORCPT + 99 others); Thu, 14 Sep 2023 19:31:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230441AbjINXbV (ORCPT ); Thu, 14 Sep 2023 19:31:21 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CDAF3C14 for ; Thu, 14 Sep 2023 16:30:36 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-2745cd2ba68so1312334a91.0 for ; Thu, 14 Sep 2023 16:30:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1694734236; x=1695339036; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=L5Atq17mYlT6kG+rBiO4juTIlMt9CxnTqo+M16pkWhM=; b=dEQQvojIaPClf9MI5PCpnvAZyss1vL2gH0ndC1RoEbHw2R/H0bTZpiTwk/8rFYFY6z 7BDa04ukYfbe5meZzc/B3/MeDj0YREjaf5v+db9IGwlAARvPGylXAnqMuY08vbRQDHMW acxpUhtrDC10zo5PDmj1+bhxp+bcDNeTZPvXkJQ/ESsdcc7iMea0r1k+8wbmv3hKbPzk BkpoJIJ1OrGOMQsU6sNKbrSVz6S0CTMoJwOvNAvtg1pR6IaGIfZeH5WRvnHZ5kzPECcI ztTM6IRBrg3hCN3U0sTkOttaHW6z7jzU9nxkl/3d+alxtVmGsFxQwXbTUOevGiE7CJA1 8TAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694734236; x=1695339036; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=L5Atq17mYlT6kG+rBiO4juTIlMt9CxnTqo+M16pkWhM=; b=w2SHlbkz0FebYcc/Dja1z+uI0wbuWrtoU4fIu9JRxT+fCdceXibEGESf9uveQQ6OOA p2epUVGm3rh/MHbEADwkzQ0oD5tgXRtw03K3DIO4JWNLx5sLkOiV5RBQQjuf1RJ2P32A 1+f9vsythJ4iFhAJa3thDSrnuveqM3JVrytItqRrdC52SeqPHp4ZSASa2+DiwYUmEHtm zKNkPAO9TJ6K7XPb9KRuG9Wmp9ATB1K7jHci7aUMpGL7b4fXjjV/ooaWNp7Qk2qs18YQ KP6MJ/ZvRkWT4Fmu4tyGON2ErTwQjaDubDkShlTINneihTRUkYYa/QFBWDUXLWufUlll t9Kg== X-Gm-Message-State: AOJu0Yy6rBpTBSc/BpxUCZTkJf42XvT2Hpps9xW8feQSAn0KIQvzHQ+3 IC058tLbvoMMNVftGnHel+5bMA== X-Received: by 2002:a17:90a:7f91:b0:273:f887:be17 with SMTP id m17-20020a17090a7f9100b00273f887be17mr6929040pjl.47.1694734236251; Thu, 14 Sep 2023 16:30:36 -0700 (PDT) Received: from ghost ([50.168.177.76]) by smtp.gmail.com with ESMTPSA id w7-20020a17090a460700b002746d2a54fesm1713196pjg.8.2023.09.14.16.30.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 16:30:35 -0700 (PDT) Date: Thu, 14 Sep 2023 19:30:30 -0400 From: Charlie Jenkins To: Conor Dooley Cc: Conor Dooley , Palmer Dabbelt , Samuel Holland , David Laight , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Paul Walmsley , Albert Ou Subject: Re: [PATCH v4 2/5] riscv: Add checksum library Message-ID: References: <20230911-optimize_checksum-v4-0-77cc2ad9e9d7@rivosinc.com> <20230911-optimize_checksum-v4-2-77cc2ad9e9d7@rivosinc.com> <20230914-mural-deskbound-0e37d0767f6f@wendy> <20230914-thinness-overtly-70c49b219c26@spud> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230914-thinness-overtly-70c49b219c26@spud> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 14 Sep 2023 16:31:35 -0700 (PDT) X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email On Thu, Sep 14, 2023 at 07:02:29PM +0100, Conor Dooley wrote: > > > > +#ifndef CONFIG_32BIT > > > > > > These can also be moved to IS_ENABLED() FYI, since there's no 32-bit > > > stuff here that'd break the build for 64-bit. Ditto elsewhere where > > > you've got similar stuff. > > > > > > Cheers, > > > Conor. > > This is an ifndef, so 32-bit compilation would throw a warning about > > shifting by 32 bits if IS_ENABLED was used instead. > > Fair enough. I did accidentally invert things in my mail, I did notice > the n, I just thought it did the elimination beforehand those checks, > sorry for the noise. It appears that LLVM is smart enough to not attempt to compile code that will never execute but GCC is not. Pretty interesting because it allows the ".option arch" code to be encased in IS_ENABLED because it is only not supported on LLVM, but the shifting code needs to be in ifdef because otherwise gcc will complain.