Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3525802rwb; Mon, 16 Jan 2023 09:06:38 -0800 (PST) X-Google-Smtp-Source: AMrXdXtgeP30TV2i/fdZW1CpIUk7fToFzSvchoTW3pyMTLk9ILm0BrkTagm1iBAiXKs65hUvkNwE X-Received: by 2002:a17:90b:94c:b0:228:d1d5:5468 with SMTP id dw12-20020a17090b094c00b00228d1d55468mr25028585pjb.25.1673888797853; Mon, 16 Jan 2023 09:06:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673888797; cv=none; d=google.com; s=arc-20160816; b=GjGogGlNWDUg3Jzkd0H9GeMUGZhpALWuE8J+heEKC4lCkMEpWxwDiF4R6wm9xXmqep CczMxga6pqs8h11YJzLFI1xL5LP/cV4WXDmgI5lk2JT2okDLlABhj8dQ35P6HLcbypLJ YmVXSL8RCo6DLbtvdv3+sBXH9nZUkKgDbtKcSIrMscoAyG8OESt2oh/+m7LPayCNya87 xKvYGpQOeojAnAHKLdVcPgrtGrPNWu8e0lbIkv6YkXorTnApLn2vQE5CZGTzYBHOe9I+ I4YqIDF9T5TJx0LDbOVkP0hbM1Y/HCSRDPKy8I3ni8qxxSUJzOc9rcbPh8UZ+MPIOR5L e/GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=4NTXeYjR1MTaqscSL/tg+rkNJdg9lEa1fWq8iwfJFrU=; b=X4sKxdV3VI8jSZyQmHJgbVChftzb1PV4mdEgrJUymRheMowyAKYarvN+wQRHmZDq0M 7obbs7Gi8ODzQRgY5b9S1z0Q+LavTCtvOGZvasafXv1JSfzH2JS3leKXd+vSAvBVKnn8 KLrJgru2MjwkPRWPZXZ1QB/j/A+ZLo+2ny50+fJDEP6q7Y/Q5DQMaoqLXWGyPuohE0gm 8NBDCWeMHeYx62FpVb3zNzEt6Fu7E6dA7W81nhVN40rPDbHrMCTbR6CZ71lo1/J6Qytz RNr7N530Q0atT2Wukd1kKw++DEmigmq+c6FDlnc/+NA9f30zpxKQ5F1kuqms7x6BFJ7J DwAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C65v3vdi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l71-20020a63884a000000b004b68997578esi18726408pgd.61.2023.01.16.09.06.30; Mon, 16 Jan 2023 09:06:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C65v3vdi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232172AbjAPQIt (ORCPT + 50 others); Mon, 16 Jan 2023 11:08:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232418AbjAPQIK (ORCPT ); Mon, 16 Jan 2023 11:08:10 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8EAE61CAC1; Mon, 16 Jan 2023 08:05:52 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 46820B81077; Mon, 16 Jan 2023 16:05:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7B566C433F2; Mon, 16 Jan 2023 16:05:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673885150; bh=+AipM2Pq+d4OXfcZe0Uf7z/JOMjM5O4VBzmXDSASdHY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=C65v3vdiMNrh12tjb48fDRMHoGt+vISIqIe6ijmIFH3gk7APJ2vd6XMn8RgUNwFhh X1THh2L7iF7UFYIhPamO4VkdJxopzleboE/DAd4Y8eQ9D/bgl94RKpZQzWAL8Hp+gv f77JTV7g1OsTVZnufMSR39m+wTdVKAwuE6FDWI74fb95+Hfy3XHFftduHklPjS8pR0 v3tuErxX7Qi7W1yb0rzA8j6l3FAHJNofWawFohluFmR+hr8btOCm7yTmpuo4qlqXyp X75mfaeafgbsZiTvwDYrrrOXCjwhXsSNVadh8lRDBYHnD0/fz3k1RTsA222U30I7Jt KNQyxLZ9Z/sDQ== From: Mark Brown Date: Mon, 16 Jan 2023 16:04:41 +0000 Subject: [PATCH v4 06/21] arm64/sme: Manually encode ZT0 load and store instructions MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20221208-arm64-sme2-v4-6-f2fa0aef982f@kernel.org> References: <20221208-arm64-sme2-v4-0-f2fa0aef982f@kernel.org> In-Reply-To: <20221208-arm64-sme2-v4-0-f2fa0aef982f@kernel.org> To: Catalin Marinas , Will Deacon , Oleg Nesterov , Marc Zyngier , James Morse , Alexandru Elisei , Suzuki K Poulose , Oliver Upton , Shuah Khan Cc: Alan Hayward , Luis Machado , Szabolcs Nagy , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, linux-kselftest@vger.kernel.org, Mark Brown X-Mailer: b4 0.12-dev-77e06 X-Developer-Signature: v=1; a=openpgp-sha256; l=911; i=broonie@kernel.org; h=from:subject:message-id; bh=+AipM2Pq+d4OXfcZe0Uf7z/JOMjM5O4VBzmXDSASdHY=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBjxXWm6ka3iCKzF9msLFjOY6Tpod5hP5a4+oCc7Plz dsetlWuJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCY8V1pgAKCRAk1otyXVSH0IoLB/ oCzL/cvXGHbVK0qsfiCWqHKuX7fx4HIW7GoJjWbFMAujiA08YUJGei6o8O2VeLLs4Ph+P+cOX8cIn3 77LCO25IOV9LPdhLadAL27wvGLfsFQlYWvR3bOycpRx9dVKo5LZxKiyZzx+p3Hk4mIOO6FWI8TmNUZ e1+zGw2AJg3clPMGzRqI0nBLWVUMr3fnpiq+Hgfo3MzFhkOmYBgz0jnkzIdisZG1gvq84mFTYWewOA RHeDMieyeYocbx6lWhBe/u+JpBRmwnbHaJBx7TJRegeOvUMNB1zG1cVA8ODqF8JmrMzQGEPoEyYAS2 0Z/jAKYKEWAAcpny/vgsayGJ9k5LrN X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In order to avoid unrealistic toolchain requirements we manually encode the instructions for loading and storing ZT0. Signed-off-by: Mark Brown --- arch/arm64/include/asm/fpsimdmacros.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/arch/arm64/include/asm/fpsimdmacros.h b/arch/arm64/include/asm/fpsimdmacros.h index 5e0910cf4832..cd03819a3b68 100644 --- a/arch/arm64/include/asm/fpsimdmacros.h +++ b/arch/arm64/include/asm/fpsimdmacros.h @@ -220,6 +220,28 @@ | ((\offset) & 7) .endm +/* + * LDR (ZT0) + * + * LDR ZT0, nx + */ +.macro _ldr_zt nx + _check_general_reg \nx + .inst 0xe11f8000 \ + | (\nx << 5) +.endm + +/* + * STR (ZT0) + * + * STR ZT0, nx + */ +.macro _str_zt nx + _check_general_reg \nx + .inst 0xe13f8000 \ + | (\nx << 5) +.endm + /* * Zero the entire ZA array * ZERO ZA -- 2.34.1