Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp737842rdb; Tue, 19 Sep 2023 08:44:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IESkwZVUnDlCjMpNwsGfnRzgMAvuDtFH37Ebtd/ptfdB0wd0NvzCc5avLWVT4oIrfCUcvDO X-Received: by 2002:a05:6a00:1893:b0:68e:25ff:613e with SMTP id x19-20020a056a00189300b0068e25ff613emr26070pfh.3.1695138297402; Tue, 19 Sep 2023 08:44:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695138297; cv=none; d=google.com; s=arc-20160816; b=aVS2kEtRRtRjCDLSD0tAt8ZYd6aMrxKoJ/X+R+iMNLbxwwbJrZ3WuJ3PXZ/NPmTh2x ooihKG2CovF+I0oM+v1sKA407aPO4kFv/qC63m7fxT221sdwnpRn+1KY8y8uGDKi1jUJ +2rs8ZTnmzmhBjJ+qqOvrn/jpsuJkpk0ITFy60CU+bNlcYLaU80P9w45o15wuq93G1Ts b7O7/Mgx53oDKRK4tWeOGH16hJcAOaeUFMj60WdZSsCLzMSTjozzLNeOs/Aj+qFU2CNG MbkM+K4I9R1BjUakqo5U5YUcbsAbzIRYdHheqoipcO+Y8TZUnfV0HR/o1md2uyPXtlkv kSUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=YSBSEOyh5xp2ZYAU6p4Pp/LHCpEmtwDbEv5Nchofw6g=; fh=occj1q8wJEOWtSaQz2/Q7eCmXsZQQM36zOBj1hr2l90=; b=G4DfqZSHhZHQpCZkjbeAKME7LNdgkHgBTi/lsuM3hWcxg7JoAZ9idummwam+9X8665 0IDZ/tKTOsjwj5NhuAi2EfVrOFBALZjA2bb5yCCgkqWIUssZmcP49Ndf5ZlfVQ8XV1D4 ib2QeCGxia5wyablC4RHWlXHfgdyQPvMHEbz2cQYmrUZ5vUvEymJdAGPB0gZ+7gs0qd8 4WjH1BTqPTP0nrApbklsluOQMVPId4gOxAHEDrDKpo9UPJRbjI+R125iMuayLcTIQm6p BwJOwXdgWyV5anz4r0nZb5S/UpFUr6bx6TbWegwjdWFz1O7y0Y+WkN1V46fPUjBmEPib I/eQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id g25-20020a633759000000b00578b6e2f462si1328899pgn.351.2023.09.19.08.44.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 08:44:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 6872483B6BFD; Tue, 19 Sep 2023 08:22:50 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233135AbjISPWw convert rfc822-to-8bit (ORCPT + 99 others); Tue, 19 Sep 2023 11:22:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233144AbjISPWt (ORCPT ); Tue, 19 Sep 2023 11:22:49 -0400 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.86.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0D0E130 for ; Tue, 19 Sep 2023 08:22:42 -0700 (PDT) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-213-T6mP4cI8MPimIBAjGs1jLQ-1; Tue, 19 Sep 2023 16:22:30 +0100 X-MC-Unique: T6mP4cI8MPimIBAjGs1jLQ-1 Received: from AcuMS.Aculab.com (10.202.163.4) by AcuMS.aculab.com (10.202.163.4) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Tue, 19 Sep 2023 16:22:25 +0100 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Tue, 19 Sep 2023 16:22:25 +0100 From: David Laight To: 'Matthew Wilcox' CC: Greg Ungerer , "linux-kernel@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-arch@vger.kernel.org" , "torvalds@linux-foundation.org" , Nicholas Piggin Subject: RE: [PATCH 09/17] m68k: Implement xor_unlock_is_negative_byte Thread-Topic: [PATCH 09/17] m68k: Implement xor_unlock_is_negative_byte Thread-Index: AQHZ6Kr+hLdybFnA00ugx5L/MFgM8bAiJxPQgAABTgCAABHZMP//+8IAgAARftA= Date: Tue, 19 Sep 2023 15:22:25 +0000 Message-ID: References: <20230915183707.2707298-1-willy@infradead.org> <20230915183707.2707298-10-willy@infradead.org> <6e409d5f-a419-07b7-c82c-4e80fe19c6ba@westnet.com.au> In-Reply-To: Accept-Language: en-GB, 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-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, 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 lindbergh.monkeyblade.net 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 (howler.vger.email [0.0.0.0]); Tue, 19 Sep 2023 08:22:50 -0700 (PDT) From: Matthew Wilcox > Sent: 19 September 2023 16:15 > > On Tue, Sep 19, 2023 at 02:35:25PM +0000, David Laight wrote: > > From: Matthew Wilcox > > > Sent: 19 September 2023 15:26 > > > > > > On Tue, Sep 19, 2023 at 01:23:08PM +0000, David Laight wrote: > > > > > Well, that sucks. What do you suggest for Coldfire? > > > > > > > > Can you just do a 32bit xor ? > > > > Unless you've got smp m68k I'd presume it is ok? > > > > (And assuming you aren't falling off a page.) > > > > > > Patch welcome. ... > I have a 68020 book; what I don't have is a Coldfire manual. > > Anyway, that's not the brief. We're looking to (eg) clear bit 0 > and test whether bit 7 was set. So it's the sign bit of the byte, > not the sign bit of the int. Use the address of the byte as an int and xor with 1u<<24. The xor will do a rmw on the three bytes following, but I doubt that matters. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)