Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91FBDC433E0 for ; Mon, 29 Jun 2020 13:42:44 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 60E5023B06 for ; Mon, 29 Jun 2020 13:42:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dzskYuIU"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="t2OJlFE8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 60E5023B06 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=GUDbFTJ0OBxH+MmotZxIrAQz50JtA7wJDKsa1rqOoEc=; b=dzskYuIUVUE5dBvji+Xgu1vDn ibet7J7WNCgoPiiPcIllJmQmtXVluARJ4exZI31/AHyk5vEFoye4T+lFK/FTo3v60q2sZaCnM7K3O BO5rG56m08vY0of+xSOMH6fytSudqWfgb5akmwj8dN0khSvOmCjAHgfzZAwQazya6d9EewYMuRnAt DGMGWyDZGz0Oq3yRsE864s7hGyIHsL+LHDQGth6rJQlKXsx7HZSMRc9VNGBHjRDRelwh0eqP/wfZq kQP1hS+k77ryCMEdECCFSkp7haT4bRtoL6CjxAycWfQW/qn9bMiboKcD4yfnB+oajzqvJUs0zKltB jDOtbE/Gw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jpu29-00010p-GJ; Mon, 29 Jun 2020 13:41:17 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jpu22-0000zN-MG for linux-arm-kernel@lists.infradead.org; Mon, 29 Jun 2020 13:41:11 +0000 Received: from localhost (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 85C9A23B06; Mon, 29 Jun 2020 13:41:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593438070; bh=GOFW3fRHKQWzvgnyR/KOeyLYRgQwaTWhjUjYADn69Tc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t2OJlFE8xo1MrKdLnLnmDnnYWktX7SAjApiJLfZyZJBbsHTj8oQJhv57E+VFP66AT iCzginwjtV5jxwfLileb0AQgZuaHHtia08+n9gsAMnQdj1TEF7w0TFekgrW5b1Zfyy VGvH72XlWYUSPxDMQ23g/0XEIKC0Mg6d7/W4yuJ0= From: Mark Brown To: Catalin Marinas , Will Deacon Subject: [PATCH v3 4/8] arm64/fpsimdmacros: Introduce a macro to update ZCR_EL1.LEN Date: Mon, 29 Jun 2020 14:35:52 +0100 Message-Id: <20200629133556.39825-5-broonie@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200629133556.39825-1-broonie@kernel.org> References: <20200629133556.39825-1-broonie@kernel.org> MIME-Version: 1.0 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , zhang.lei@jp.fujitsu.com, Julien Grall , Mark Brown , Dave Martin , linux-arm-kernel@lists.infradead.org, Daniel Kiss Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Julien Grall A follow-up patch will need to update ZCR_EL1.LEN. Add a macro that could be re-used in the current and new places to avoid code duplication. Signed-off-by: Julien Grall Reviewed-by: Dave Martin Link: https://lore.kernel.org/r/20190613161656.20765-5-julien.grall@arm.com Signed-off-by: Mark Brown --- arch/arm64/include/asm/fpsimdmacros.h | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/arch/arm64/include/asm/fpsimdmacros.h b/arch/arm64/include/asm/fpsimdmacros.h index 75293f111a6b..feef5b371fba 100644 --- a/arch/arm64/include/asm/fpsimdmacros.h +++ b/arch/arm64/include/asm/fpsimdmacros.h @@ -187,6 +187,17 @@ .purgem _for__body .endm +/* Update ZCR_EL1.LEN with the new VQ */ +.macro sve_load_vq xvqminus1, xtmp, xtmp2 + mrs_s \xtmp, SYS_ZCR_EL1 + bic \xtmp2, \xtmp, ZCR_ELx_LEN_MASK + orr \xtmp2, \xtmp2, \xvqminus1 + cmp \xtmp2, \xtmp + b.eq 921f + msr_s SYS_ZCR_EL1, \xtmp2 //self-synchronising +921: +.endm + .macro sve_save nxbase, xpfpsr, nxtmp _for n, 0, 31, _sve_str_v \n, \nxbase, \n - 34 _for n, 0, 15, _sve_str_p \n, \nxbase, \n - 16 @@ -201,13 +212,7 @@ .endm .macro sve_load nxbase, xpfpsr, xvqminus1, nxtmp, xtmp2 - mrs_s x\nxtmp, SYS_ZCR_EL1 - bic \xtmp2, x\nxtmp, ZCR_ELx_LEN_MASK - orr \xtmp2, \xtmp2, \xvqminus1 - cmp \xtmp2, x\nxtmp - b.eq 921f - msr_s SYS_ZCR_EL1, \xtmp2 // self-synchronising -921: + sve_load_vq \xvqminus1, x\nxtmp, \xtmp2 _for n, 0, 31, _sve_ldr_v \n, \nxbase, \n - 34 _sve_ldr_p 0, \nxbase _sve_wrffr 0 -- 2.20.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel