From patchwork Thu Sep 30 18:11:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 514930 Delivered-To: patch@linaro.org Received: by 2002:a02:606e:0:0:0:0:0 with SMTP id d46csp36108jaf; Thu, 30 Sep 2021 11:15:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwC20iMBCd3RfBBjSuccB7uj1fcojbMKMnxeoEjJ5jDofQlyKEFC+Clx6/Nor96eYA3C41p X-Received: by 2002:a50:da07:: with SMTP id z7mr8771954edj.301.1633025749089; Thu, 30 Sep 2021 11:15:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633025749; cv=none; d=google.com; s=arc-20160816; b=AZAxzNaI6F7Nzz2Vb/xShhFJfyhDtDCVdUlhJ5y25qT/TX7lEu4PMr4nsb+CnXxuRv w8JeLdaeqGVFi1u7lBVowkMauKocvktRW/SER+XB7b141UcT57yjVej7zaJHxmGd9OBf se2q4okOfx7ffhebRAA5od2uMIngkDHVAM5+gjGPlqOsbb7lrfKeHxVOfd83srPtFu4A rCRJt7sUzc/o7h/cjpLq1B2lVFy3TKLTB85MWXW10Qrwzuq3DPWr3hHUyy2rbi2uAFTx 6IqTKXcrrvxE1iGWnfADeXUxR5zuuqavt7MurNR1lnhoasiXXBxTa33EYHgxLw3h/w9y FQJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zT9O9s7gbTylGgDhL1aaycNUEiLtMSJA9xKPTH7GO3Q=; b=nq37Z9Yn/NzAY9KRocLoylzeJ2TGR7GMcmupUe6D1MlDkqrkErxF5EM2k5RrkRiM2a lhYxCGSyJiPi2YvcAsKvpm/hsPFUM0AfUNBsW5EeQjkuy3tH4kO10dMxYN3QzlkKJA2y Gw4CxSM+4ZkP9Zx4R8oU4JGcyTnuVgpcUslMq6zookUophQWFC4alePzQdqapCqoyngl QXLu0yDfoA1dI7U3TUxJ1I7mP/MdDY82X5sG6+vehgOCByqkxjWnvqxqNgO4+ZXI3qWv 5nANVe0Kb8W2OV77AyRb9PUrWHS2Q+fDVFFBwSlCbc47tfiRCgT8dBCrcz2VeWBANIx6 7OiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Dzhn7LnV; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ga1si4939846ejc.128.2021.09.30.11.15.48; Thu, 30 Sep 2021 11:15:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Dzhn7LnV; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-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 S1353323AbhI3SRb (ORCPT + 5 others); Thu, 30 Sep 2021 14:17:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:56416 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353145AbhI3SRa (ORCPT ); Thu, 30 Sep 2021 14:17:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 475266140F; Thu, 30 Sep 2021 18:15:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633025747; bh=9bcf7KxjnHwy84LLqVT2WnWXLe06Wq7dmDWcSm397U4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Dzhn7LnVDtLMcZBjcKOXLxzwC8Ddadq4nW/cmw0YWAFPA4lZMmPyVJeZxcCAEoFKy EdDqN5NQ9R31Krc/pP/Fy4q69Zp8RZiGC5gvJmIfVaRWttCJ5MvnYv1UdmY8oo0EJ8 4Fh0HRW5DgXWGLvobo4JYPXqZrmRL041xbHSCevjsLZWD9VQwn7JEB+LY2QacRrLa3 iWNZbpOM15Lm+kQOa4esr5L0rwXU3P9FQSCoQ6DEDDCrgbKEbIew2Chk1BN++PwI1I aycXf0s6l+8QWheij30NJvGInwYGJoF/ugsqlNjdcaGrWvl21ZTbKT1zj1CyXD0+Y7 lBjnPkPhXfU2A== From: Mark Brown To: Catalin Marinas , Will Deacon , Shuah Khan , Shuah Khan Cc: Alan Hayward , Luis Machado , Salil Akerkar , Basant Kumar Dwivedi , Szabolcs Nagy , linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, Mark Brown Subject: [PATCH v1 04/38] arm64/sve: Rename find_supported_vector_length() Date: Thu, 30 Sep 2021 19:11:10 +0100 Message-Id: <20210930181144.10029-5-broonie@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210930181144.10029-1-broonie@kernel.org> References: <20210930181144.10029-1-broonie@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2501; h=from:subject; bh=9bcf7KxjnHwy84LLqVT2WnWXLe06Wq7dmDWcSm397U4=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBhVf3EVkrXn6fpHj4dPsvwd+7Bohc92mOvGdm5ZmL4 HxEgWXqJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYVX9xAAKCRAk1otyXVSH0HulB/ 0YWPgoP4fwpMbpc3f9Dop3HPiTKF+gycRFh7ywTqRw2NB5NA4eNmUb8/mE0oqt9A0w0KVzTE9n7lpt d5H4bAOrVyMxFsf7ns53KNT0NvBaOyXOR/q46HKPoATdhEIVbhoXR80CpK1lg4HjgcelhybIh0+y8+ NGHsDL2jigKGpFuhh2ohuHMCoZGPwVyabs4uyM9joWYlQCwqhHDmuLlO2rNXl29zsoByv7sZCUPLDU 2qId51zaWPFLPViIdPWW1/8H4A8cM1HY4dIYQNpllRhnQW9Ai4TtR5eNh2t717vtowYe9B+A0Wk7OU ZFmCYrN6gqbfztN+2exNJkMwHLgUx+ X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org The function has SVE specific checks in it and it will be more trouble to add conditional code for SME than it is to simply rename it to be SVE specific. Signed-off-by: Mark Brown --- arch/arm64/kernel/fpsimd.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) -- 2.20.1 diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c index 3465d3328e44..dff71c041e85 100644 --- a/arch/arm64/kernel/fpsimd.c +++ b/arch/arm64/kernel/fpsimd.c @@ -337,7 +337,7 @@ static void fpsimd_save(void) * If things go wrong there's a bug somewhere, but try to fall back to a * safe choice. */ -static unsigned int find_supported_vector_length(unsigned int vl) +static unsigned int find_supported_sve_vector_length(unsigned int vl) { int bit; int max_vl = sve_max_vl; @@ -379,7 +379,7 @@ static int sve_proc_do_default_vl(struct ctl_table *table, int write, if (!sve_vl_valid(vl)) return -EINVAL; - set_sve_default_vl(find_supported_vector_length(vl)); + set_sve_default_vl(find_supported_sve_vector_length(vl)); return 0; } @@ -598,7 +598,7 @@ int sve_set_vector_length(struct task_struct *task, if (vl > SVE_VL_ARCH_MAX) vl = SVE_VL_ARCH_MAX; - vl = find_supported_vector_length(vl); + vl = find_supported_sve_vector_length(vl); if (flags & (PR_SVE_VL_INHERIT | PR_SVE_SET_VL_ONEXEC)) @@ -873,14 +873,14 @@ void __init sve_setup(void) * Sanity-check that the max VL we determined through CPU features * corresponds properly to sve_vq_map. If not, do our best: */ - if (WARN_ON(sve_max_vl != find_supported_vector_length(sve_max_vl))) - sve_max_vl = find_supported_vector_length(sve_max_vl); + if (WARN_ON(sve_max_vl != find_supported_sve_vector_length(sve_max_vl))) + sve_max_vl = find_supported_sve_vector_length(sve_max_vl); /* * For the default VL, pick the maximum supported value <= 64. * VL == 64 is guaranteed not to grow the signal frame. */ - set_sve_default_vl(find_supported_vector_length(64)); + set_sve_default_vl(find_supported_sve_vector_length(64)); bitmap_andnot(tmp_map, sve_vq_partial_map, sve_vq_map, SVE_VQ_MAX); @@ -1066,7 +1066,7 @@ void fpsimd_flush_thread(void) if (WARN_ON(!sve_vl_valid(vl))) vl = SVE_VL_MIN; - supported_vl = find_supported_vector_length(vl); + supported_vl = find_supported_sve_vector_length(vl); if (WARN_ON(supported_vl != vl)) vl = supported_vl;