From patchwork Wed Oct 4 16:53:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13409069 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9F98E7C4E9 for ; Wed, 4 Oct 2023 16:53:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5B9676B0274; Wed, 4 Oct 2023 12:53:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 575226B0276; Wed, 4 Oct 2023 12:53:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4096D6B0279; Wed, 4 Oct 2023 12:53:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 2E1026B0274 for ; Wed, 4 Oct 2023 12:53:28 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id EEE4B40395 for ; Wed, 4 Oct 2023 16:53:27 +0000 (UTC) X-FDA: 81308374854.20.BBB887A Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf07.hostedemail.com (Postfix) with ESMTP id 3BEB84002E for ; Wed, 4 Oct 2023 16:53:26 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=SF1xzTiw; dmarc=none; spf=none (imf07.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1696438406; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=1WZX9lC/NFReBBEGgdt7ENtP8Fsb2zBQZdLGumoTT54=; b=PWNwT5eW2FgR1s7Rb9isaZUvhIC+6AWU0q7yOa2gpADQh7xYdbDye/A2iCiSWHxpcVhrXl Raz2D77U/gj+3+EdmKJv0hpCHHbN3hA1Z0IVLn92QifJ8YQ5IZvE0ifwqwDx2tx42sGVPx AL0UZm28glAsH43ve7CP2TmflkPUpio= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=SF1xzTiw; dmarc=none; spf=none (imf07.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1696438406; a=rsa-sha256; cv=none; b=OPxa3Tptc9g2PhNT50Aq5c256ekyGLRyU640U/g2hw1occ6MlWy/JkIa7VDXRbGtP9geXN CIcCPe2D6yqRQaxYX/nfy0PgiPJ17b3SgPoWQaGGIleu8rGeBuhySLumQdUD4a4uqOQ03c StuGP+5ZqmtxzYtlsxqVcDuI/Xd8SRo= 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=SF1xzTiw/J25Aeb62yc9uOpB4+ CSgdaLxXlaa78DG9BEdY53INaBkJUqAr+2EtrSVjWQpYPaKNYd5iaGUJ4ztSk+WCuoWbTjGvaPy/p N7dbKRJGnb44SYp3gdAumx6FN//w89YofZHrNMytiUcrDvEmkfGGnt2lNFsQ5ouYJN/uhULOLJY5+ twshe/tfAlP+OBacdpWeOaATD0uQsnN80U9hR2Gf+p9mUBOlYQ6irsl+Rc8oDL9XpiW65OQs1h7Ag I6tYGX10O0v74mMxVQlkiamubgo3ld8LB2Pcr09LrBiLQTUQZqYJqYfcak4+b/sd7iGmKELvQGaY+ OERNzE5Q==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qo57g-004SFb-7X; Wed, 04 Oct 2023 16:53:20 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-arch@vger.kernel.org, torvalds@linux-foundation.org, npiggin@gmail.com Subject: [PATCH v2 11/17] powerpc: Implement arch_xor_unlock_is_negative_byte on 32-bit Date: Wed, 4 Oct 2023 17:53:11 +0100 Message-Id: <20231004165317.1061855-12-willy@infradead.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20231004165317.1061855-1-willy@infradead.org> References: <20231004165317.1061855-1-willy@infradead.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 3BEB84002E X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: 7khjpxtzwir3hyzw7unajjq6d5wo1eyt X-HE-Tag: 1696438406-834356 X-HE-Meta: U2FsdGVkX19q5eNLvKCYImuJU7ukR/2jSFXjpukAqfMctMr7zaG3lz+/pN2ERgnowCuvR2dh7pwS9yNpfBB6JHr+E2svd6u58ygDWeoCVLWtYJIY6kg1EFlofQ9DrMdrEIQW0IxS5OvBjq04BixH3qF9lEp5adlWGG6zdcXmJDo04kl2q/AM/foinlMRyOG47rav6zMb4tXTFgZWZplA0vDM4I8lsjTVfb5m+zCrJk58asRs6SWPe49gCCSyDT1j2jq8PtrYVOYwDn33IzgcZmBsMrmRMyY1CmNuk1kbegz6mEXkb2TK7gxzMDawNJTa1r6rEZC2xqk32ItoPAL0FIYQgz/VUIppVFwcAre9XsMvAoURSYwl9DEwRA4s8iyWyYxpo03xEb9RWdbU5Ep337e6u1B7xDfN3w8W5wbDCXeQaFKEC3oD/gLiIBQk/mBLv5MTA96HU6redux/IcCgUMnhyu03iXtv0ajemMGAGh0UKtyBRqQgQmAFHKXYgbKTN8k7ZY8xiFToeYA8fsBWahBT5s7/8MecHqCZACdAu5+BQ4bCE+P6gLt66cVeKUOyjabriVZ2uFKWVp3sy1D+177N53kKJIw1hDgQO9UEnq0hnDrhWDwpGKXs2BX5YS6OBiUINlJIIo+6g6c8s3WYdBbEpBnPVpgxJTkMtt7Qk/3aMsayqtun5ulOcFQzXWEr5evxLrSCcmFPUjKeyidCXuJPqLDJhwjSNIAJD0tvr1/WUbDBmArxEi9T4tvR3DPqd51r+klRDOy9gMnht9KtZCPFPBEvjTh6sEblzc6yIcLmjYfqxcly4tel0nga4HfFJLzr3RV+AMi4wJ3om6LuHkL+gR9eZLnWuTGj1yxWlazaHzvBXcGYJs46nZpzzeFv10YoBiQVGRQzyCRjnRVd0r2nRLeoj9FMakmNrcJx3bo1gDyyx/X/vf9sfRGJE9SQ3BMIBIIFwwauWYOrr25 KPwKrbFQ DaHF1BldrXjHiR2iW03lDyzBNdesf1IgSh330gZabjW3SWrE1mLIueVT1dghuikVNeMcXPQkxYpaSKfrcW78aUPBlPLy30OK7L5KDkxAxi5zqh8dfb70wCQiK3/rYcwES9KL2e6H5IUj+UrbZUqrY3JJa9CYS/KKLn2H6nyadv1slyKENchPIQAGCVo3kwI9MGmimKuIYza7psU792wAjuCvmOXx/Q3uMv+Tu X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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)