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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 432B7CF6D38 for ; Wed, 2 Oct 2024 15:42:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=BMuFp6qa5vLaVyxgZKB5XQv9G2kGfOHAFtx0MU8KfO8=; b=VPHzHC0KPGm6f2sdmfeT1qzJgI VYflPnSAAXMmTfe2hFJqL1kUajO2B1kBg+A6jfb4Q4jaThDT+7ZfkIj1tFK4gcaNk8ui//gkqeOF0 Ga+ypf75m1bN8cPs6bbKWsPpRX1zsMKYFbPCLun9ZHz4C8/T+5aGWHU8+5i0JHrzhsG9AWXNha11E iVTxGUPb3rcvbUmtUorPHZHktZoBUgFJ0VRg2T5LpQp/qq2L6ZviXGWXQdIDkjTWH7mgYJbmjqx5a qfUU/2E+c0XORgV1dVOQ787EHWMaF3CmxY0v/4IrUEeIVzl3blZkOu/Lcp2zhNQahLBPxo+bI7Z/B fHqVRtMg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sw1Ur-00000006jFK-1wUb; Wed, 02 Oct 2024 15:42:37 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sw1QP-00000006hxV-3EDR for linux-arm-kernel@lists.infradead.org; Wed, 02 Oct 2024 15:38:02 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 5EF8DA43E9E; Wed, 2 Oct 2024 15:37:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C6C2C4CEC2; Wed, 2 Oct 2024 15:37:59 +0000 (UTC) Date: Wed, 2 Oct 2024 16:37:56 +0100 From: Catalin Marinas To: Kristina Martsenko Cc: linux-arm-kernel@lists.infradead.org, Will Deacon , Mark Rutland , Robin Murphy , Marc Zyngier Subject: Re: [PATCH 5/5] arm64: lib: Use MOPS for copy_page() and clear_page() Message-ID: References: <20240930161051.3777828-1-kristina.martsenko@arm.com> <20240930161051.3777828-6-kristina.martsenko@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240930161051.3777828-6-kristina.martsenko@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241002_083801_904981_1EF89EFF X-CRM114-Status: GOOD ( 14.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Sep 30, 2024 at 05:10:51PM +0100, Kristina Martsenko wrote: > Similarly to what was done to the memcpy() routines, make copy_page() > and clear_page() also use the Armv8.8 FEAT_MOPS instructions. > > Note: For copy_page() this uses the CPY* instructions instead of CPYF* > as CPYF* doesn't allow src and dst to be equal. It's not clear if > copy_page() needs to allow equal src and dst but it has worked so far > with the current implementation and there is no documentation forbidding > it. When we get real hardware, if CPYF* is faster we should switch to these instructions. I wouldn't expect source and destination to be the same but we can add a check. > SYM_FUNC_START(__pi_copy_page) > +#ifdef CONFIG_AS_HAS_MOPS > + .arch_extension mops > +alternative_if_not ARM64_HAS_MOPS > + b .Lno_mops > +alternative_else_nop_endif Same comment as on the previous patch w.r.t. the branch. -- Catalin