Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1007481rdb; Tue, 19 Sep 2023 18:03:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEJucpXlUaI4EbQ0CrknhRtGq/rE+gRK1bbJyrQn9xUz7UYF7wsL22Ifz2y27ZGwidQBQ59 X-Received: by 2002:a17:902:d381:b0:1bb:b74c:88f6 with SMTP id e1-20020a170902d38100b001bbb74c88f6mr936698pld.16.1695171785524; Tue, 19 Sep 2023 18:03:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695171785; cv=none; d=google.com; s=arc-20160816; b=pn6RCMjmYrUqCYwh1fZYnb6Sz7pM1R+Dhdp+1BBT36+s62kEwOfiC0kpYTYVv2gJ9n PfiSDrmcLiO9LQ9p6Civ0oL0w+RTNNeZT/sApVjv4dG9KMdb2VfEw2/kQDAgs7eSgMdU kUi77M/gkXOPUHWHPqJ0f+luUOq15UeGVIlIjhr8MMt8rcWNuERVOdxqSDhdGWbGS4nc pEspYtVTPfXatGcDOMau/7tbJe7uMwTyZOBKNV22qBVV+64YUqpENJSI8wF7T4AQ2RHJ q2LtNOwEONj/2HI/vgt6LYesMeVT9abD82zKJ2v2KxkgbBW1lQpypA+5qqYNYyhGODKu G+AQ== 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=ho41svlP2AnIR71/YViS49+x6zj9O4UA2RkQCTRc9gI=; fh=aVJKnREZOg2XLhmUlQkbgscHvQVkot5ZlDSuOcAblpU=; b=MCQcn8EidPUV7Xf4SNxFmy9+IRNkK3Y7CMhKRWlf56PTGbeYJYtIC31t/wBB8mepAE I83tt3OwJoZuahUClKKV5YyLBNkzqGtIUo4yTPv76Qi0wn/DH6fa8dQtLWWQfcka3LGN Hzos/oAIlV3HIQGHNLTGJwW3pEHsII7rPlYirevPIH7ZGXTiUUz0w8JPBza+Bdhjp+7R aFNFIY96HunlDd+5474Wz14uGzTWh74x2bFGk8skFmtzarlj843XngSvcxLGSPgCWI71 S5zfSufrvOHXhI8d+AhRcQx2fo8ssa3XjTb1p96Me6WG1s4eOyhGMAt6eHLPetVZj0Cr bMYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=iJkDmryc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id i9-20020a17090332c900b001bdc664cd65si11005821plr.165.2023.09.19.18.03.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 18:03:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=iJkDmryc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 3906E8283A0B; Tue, 19 Sep 2023 08:15:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233162AbjISPPR (ORCPT + 99 others); Tue, 19 Sep 2023 11:15:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233132AbjISPPP (ORCPT ); Tue, 19 Sep 2023 11:15:15 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56F6194; Tue, 19 Sep 2023 08:15:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ho41svlP2AnIR71/YViS49+x6zj9O4UA2RkQCTRc9gI=; b=iJkDmrycNCqwLPt1Ftw8ltXU7+ LOjQxHwJ6iYkjxpyldZnAuh2aSS7AKrg2/mzddsIaYA1OTsUVNU1ZO4NSkVmNRIGnHe4eUwa4zwUg E4ILepeUdxk1UVaou2f3LxRg/MBkqIH5RY+P1uQZ9E7PkVoynsBc6k5rkuhF5eZdei5cd2mCziz/w I0tyivnheP6EdtcYbBgTet8ziVqzM+diyh/sYOviI90omnLhM2OqG6qQaXKKvoC7OHyrRj9cDx7a0 HkhqaR6HWtvonBFNFulP0R+E9cRt0F+PjV7idl9gObPI7sI6mlag8I5gObVC7s03f6+jBYXjpHDEv 1VYLssBA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qicRC-000J2M-Q8; Tue, 19 Sep 2023 15:14:54 +0000 Date: Tue, 19 Sep 2023 16:14:54 +0100 From: Matthew Wilcox To: David Laight 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 Message-ID: References: <20230915183707.2707298-1-willy@infradead.org> <20230915183707.2707298-10-willy@infradead.org> <6e409d5f-a419-07b7-c82c-4e80fe19c6ba@westnet.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 groat.vger.email 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 (groat.vger.email [0.0.0.0]); Tue, 19 Sep 2023 08:15:42 -0700 (PDT) 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. > > My 68020 book seems to be at work and I'm at home. > (The 286, 386 and cy7c600 (sparc 32) books don't help). > > But if the code is trying to do *ptr ^= 0x80 and check the > sign flag then you just need to use eor.l with 0x80000000 > on the same address. 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.