Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp5041417rdb; Fri, 15 Sep 2023 23:57:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFy+33Zs2Yy/aj3+zAvyxmAJ1CbHkN9qIY6SThhkxfylfea+qX/Yv6djAI2V8J9hhSgvE3S X-Received: by 2002:a05:6870:a446:b0:1c8:c2df:a927 with SMTP id n6-20020a056870a44600b001c8c2dfa927mr4499648oal.53.1694847443389; Fri, 15 Sep 2023 23:57:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694847443; cv=none; d=google.com; s=arc-20160816; b=VGOJ/oX1djFiVsducKFcCh0SAlOLiuXpJzSwy6kB/SNiDVPrpzyfFP+/gPaCCs45Ud g0CY8TqO/RvAP8yq3Y7/PGYSOVC1ASDMaxA5cYLs1/q8CojU9rYDQrHHXZHzbK1pCuTG ctdkAIy5UEHIRldAKfg7btrLCn/bLsr+4U/MNRO1dN+RLRnidbSArwUb0unopvwQvt3t cFPQsQtyzIny516skRsz464gEEsLSc1DPhyMeRUCK+mAarRLtFazm1CvEc3TCBHTGK+x PFBECzutyV2sgZPcLOw3/6MDBy3TXB1ccdv/lo/3S74C50SJxmTV4heI1QHdeUYUKZen xxOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1WZX9lC/NFReBBEGgdt7ENtP8Fsb2zBQZdLGumoTT54=; fh=Exu8p2J0bt/MoYkEByA/Woj5EWTdUoRsvJYmK88z1hY=; b=ngQu7C4Miz4WK4CVNXtdVaHPZme45DKBaOWHnpQxRhvyEvSn1Rv2HxXw/vCjx0BjY9 4a3g/wC37iAX2YdzIZkiacexjAfZH2KGSZvtJcnj/IUnRppt/lm+Sk2dKNgdHQkBLqp1 y1mEgfp95CmIU8G0A3L/NKLweQqhNPWI32/V6nco3BSbPhYLsdd6TlcDTHdZad4iCB7c 6UETvqB+zF/XG6t6RXRs3+YaviKqzADVYhK6OYVhSVS9w1IQYb7MjYhLSbyIhdQbs9Tb yqRhopD02LaHWKzE+hDl4H3aSSPwb7OO/wJdZIriA8nKVujsPstscnNrEedyq9LiDDgB mGww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="fajBqc/P"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id v21-20020a17090a521500b0026f4d1e6940si3743987pjh.160.2023.09.15.23.57.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 23:57:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="fajBqc/P"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 340B78057B04; Fri, 15 Sep 2023 11:38:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236700AbjIOSiI (ORCPT + 99 others); Fri, 15 Sep 2023 14:38:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236603AbjIOSh0 (ORCPT ); Fri, 15 Sep 2023 14:37:26 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 924161A5; Fri, 15 Sep 2023 11:37:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=1WZX9lC/NFReBBEGgdt7ENtP8Fsb2zBQZdLGumoTT54=; b=fajBqc/PVmpLWssoMHeJr28vDZ ilkXDBbt56Rb0ualgExvyRQqSpVYXiMZZHCeDXpikIfzxBLmEIzlDYNLfXAZ1Cn/lojNZCh2Wrexh yqIjb+XAVcAH5C3+JpeakQ9TG52GjgtRYiCRD43iBzgHvEj450no85QLc/jqO9Mj7jluQT+wNuylE PIM6rNYr1NdwNDhRENIxbeRz5E6r62lwMe8gNo0dLbIMTIIU62YKKqGRW+VOAL9eY28yseH3ZtoWa vOUnKWwDJStVsL5+9mH1Pc8jGNkzmd4IPnjll/EekaNgUC4o3hB8j4zXSCQ9/Xgey9HuMmuysh7Dm xG1N10FA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qhDgj-00BMIq-U5; Fri, 15 Sep 2023 18:37:09 +0000 From: "Matthew Wilcox (Oracle)" To: linux-kernel@vger.kernel.org Cc: "Matthew Wilcox (Oracle)" , linux-fsdevel@vger.kernel.org, linux-arch@vger.kernel.org, torvalds@linux-foundation.org, Nicholas Piggin Subject: [PATCH 11/17] powerpc: Implement arch_xor_unlock_is_negative_byte on 32-bit Date: Fri, 15 Sep 2023 19:37:01 +0100 Message-Id: <20230915183707.2707298-12-willy@infradead.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230915183707.2707298-1-willy@infradead.org> References: <20230915183707.2707298-1-willy@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 agentk.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 (agentk.vger.email [0.0.0.0]); Fri, 15 Sep 2023 11:38:33 -0700 (PDT) Simply remove the ifdef. The assembly is identical to that in the non-optimised case of test_and_clear_bits() on PPC32, and it's not clear to me how the PPC32 optimisation works, nor whether it would work for arch_xor_unlock_is_negative_byte(). If that optimisation would work, someone can implement it later, but this is more efficient than the implementation in filemap.c. Signed-off-by: Matthew Wilcox (Oracle) --- arch/powerpc/include/asm/bitops.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/powerpc/include/asm/bitops.h b/arch/powerpc/include/asm/bitops.h index 40cc3ded60cb..671ecc6711e3 100644 --- a/arch/powerpc/include/asm/bitops.h +++ b/arch/powerpc/include/asm/bitops.h @@ -233,7 +233,6 @@ static inline int arch_test_and_change_bit(unsigned long nr, return test_and_change_bits(BIT_MASK(nr), addr + BIT_WORD(nr)) != 0; } -#ifdef CONFIG_PPC64 static inline bool arch_xor_unlock_is_negative_byte(unsigned long mask, volatile unsigned long *p) { @@ -251,11 +250,8 @@ static inline bool arch_xor_unlock_is_negative_byte(unsigned long mask, return (old & BIT_MASK(7)) != 0; } - #define arch_xor_unlock_is_negative_byte arch_xor_unlock_is_negative_byte -#endif /* CONFIG_PPC64 */ - #include static inline void arch___clear_bit_unlock(int nr, volatile unsigned long *addr) -- 2.40.1