From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79357C04E53 for ; Wed, 15 May 2019 10:15:30 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4A7072084A for ; Wed, 15 May 2019 10:15:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="FSa5DOe2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A7072084A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ACULAB.COM Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6JfRxCyZjDe2zTCxsd6N8SJw9EPXPIJi/Cbx6oR/D9s=; b=FSa5DOe29Q0Zgk wcHcb5hm9LZKYmXXKRhER4HwRymg2/22UuOZpg/v3tJPs0OncUDuyBE8uEtw3Xaij4qL1Ewtx8y27 yfOdNjUx13IkAbdCemnMgCmPo0t6wlpWdGMmYH2CHg8x5S83WwfgemDaHboQFtXhGgAsz8e2Ray2/ 6KEt+40VYyjJwToVZzR1q/oB4uk6JcZxNsh4AnTdXKnjJqM3IMYDREqDGuGZob2XeuhO9YfXLlwxk MVmox1Nr6m+aj4FsxR4bgy9Xv1/zvGxwXUI+J+F7hLA2JAK9sy9CsqA/oE2dFKrGSKvx34S2erl2z jr2bn7EZ8SbQJMml3B6Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hQqwW-0007eT-OL; Wed, 15 May 2019 10:15:24 +0000 Received: from eu-smtp-delivery-151.mimecast.com ([146.101.78.151]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hQqwT-0007dz-RZ for linux-arm-kernel@lists.infradead.org; Wed, 15 May 2019 10:15:23 +0000 Received: from AcuMS.aculab.com (156.67.243.126 [156.67.243.126]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-115-74n14Y4CMIeKYIVFWXZM2w-1; Wed, 15 May 2019 11:15:08 +0100 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) by AcuMS.aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Wed, 15 May 2019 11:15:07 +0100 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Wed, 15 May 2019 11:15:07 +0100 From: David Laight To: 'Will Deacon' , Robin Murphy Subject: RE: [PATCH] arm64: do_csum: implement accelerated scalar version Thread-Topic: [PATCH] arm64: do_csum: implement accelerated scalar version Thread-Index: AQHVCwMrtYHa1Y0LVUWOb1uB691U/KZr90eg Date: Wed, 15 May 2019 10:15:07 +0000 Message-ID: <6e755b2daaf341128cb3b54f36172442@AcuMS.aculab.com> References: <20190218230842.11448-1-ard.biesheuvel@linaro.org> <20190412095243.GA27193@fuggles.cambridge.arm.com> <41b30c72-c1c5-14b2-b2e1-3507d552830d@arm.com> <20190515094704.GC24357@fuggles.cambridge.arm.com> In-Reply-To: <20190515094704.GC24357@fuggles.cambridge.arm.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-MC-Unique: 74n14Y4CMIeKYIVFWXZM2w-1 X-Mimecast-Spam-Score: 0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190515_031522_164489_B5D3FF06 X-CRM114-Status: UNSURE ( 7.70 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel , "netdev@vger.kernel.org" , "ilias.apalodimas@linaro.org" , Zhangshaokun , "huanglingyan \(A\)" , "linux-arm-kernel@lists.infradead.org" , "steve.capper@arm.com" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org ... > > ptr = (u64 *)(buff - offset); > > shift = offset * 8; > > > > /* > > * Head: zero out any excess leading bytes. Shifting back by the same > > * amount should be at least as fast as any other way of handling the > > * odd/even alignment, and means we can ignore it until the very end. > > */ > > data = *ptr++; > > #ifdef __LITTLE_ENDIAN > > data = (data >> shift) << shift; > > #else > > data = (data << shift) >> shift; > > #endif I suspect that #ifdef __LITTLE_ENDIAN data &= ~0ull << shift; #else data &= ~0ull >> shift; #endif is likely to be better. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel