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 X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT 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 383E1C43613 for ; Fri, 21 Jun 2019 15:33:47 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 012C72075E for ; Fri, 21 Jun 2019 15:33:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GnHYhloW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 012C72075E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Uv5TUC7LKEkM4DRsaZtU9fTloqESYIrwwJU7+z/IoYE=; b=GnHYhloWdWq26g FwY56ybSx0/QA8Ar16pQewCiN2GwW6ZQRodmKwypQ104KckNXdmEJAfMwbYQeHJZevX9eZGsxjVdK wxyLVFMwFi7PRiLht0NNmdskGgSm8d3r/LCOLd/iyobsCzv9/puAAZ8v0RIgPTg277CnWO5FMROy3 s4s20mC1HtExwvRTI0BPQvefz/fjeO4M0pQwp8WcFeLOB/wz62D5OYWveEI4gKPOy+46bDjbIhl9Y dhC6HnWIwuBxtCOVybRw+9NIBDz4MzNyOzHW58/hkIWKgXItuEsLSa9ctZZrKDgdpfKHvcheQ9Fob iL89d2dHkclT1Z4iu47g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1heLXm-0000m5-1O; Fri, 21 Jun 2019 15:33:38 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1heLX7-0000EM-B0 for linux-arm-kernel@lists.infradead.org; Fri, 21 Jun 2019 15:32:58 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A955B344; Fri, 21 Jun 2019 08:32:56 -0700 (PDT) Received: from e103592.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6FE723F575; Fri, 21 Jun 2019 08:32:55 -0700 (PDT) Date: Fri, 21 Jun 2019 16:32:53 +0100 From: Dave Martin To: Julien Grall Subject: Re: [RFC PATCH v2 4/8] arm64/fpsimdmacros: Introduce a macro to update ZCR_EL1.LEN Message-ID: <20190621153253.GZ2790@e103592.cambridge.arm.com> References: <20190613161656.20765-1-julien.grall@arm.com> <20190613161656.20765-5-julien.grall@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190613161656.20765-5-julien.grall@arm.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190621_083257_482549_1AA00CF3 X-CRM114-Status: GOOD ( 15.38 ) 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: Anton.Kirilov@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, oleg@redhat.com, zhang.lei@jp.fujitsu.com, alex.bennee@linaro.org, linux-arm-kernel@lists.infradead.org, Daniel.Kiss@arm.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jun 13, 2019 at 05:16:52PM +0100, Julien Grall wrote: > 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 > > --- > Changes in v2: > - Fix typo in the commit message > --- > 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 e2ab77dd9b4f..5e291d9c1ba0 100644 > --- a/arch/arm64/include/asm/fpsimdmacros.h > +++ b/arch/arm64/include/asm/fpsimdmacros.h > @@ -198,6 +198,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 > @@ -212,13 +223,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 Reviewed-by: Dave Martin Cheers ---Dave _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel