Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp36556296rwd; Tue, 11 Jul 2023 02:34:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlGAx770xXofoMRyIufIhwtK8e3NTqemAC0axszG1UFYiJk/OdCQaO5WQAqh8l7rsx0E8IDh X-Received: by 2002:a17:902:788c:b0:1ae:8892:7d27 with SMTP id q12-20020a170902788c00b001ae88927d27mr6818966pll.42.1689068070402; Tue, 11 Jul 2023 02:34:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689068070; cv=none; d=google.com; s=arc-20160816; b=CqfFnM40DUzXJSbfbsK3tKfP359IhRGO6TFC6ZWsWhQHEDgldyuCGyAQiIff1bitlm IEg9P5+gFHe1sVI1decxPfpiD+r57be6kpbZNHToj5zgE4qYGbZy7jhJn5omMN/WxJqu JRqVccyK55KtIfTTUgwWqbP8A/ZZTpkxg8/Y+m8U/0NHjJnzCx8x4PuLSzPXJ0vBl7pL 9gPvtPf5cILwiFc8sMxDmLTvb0SiisHTBcqAxwIOe4m6yxou7AtiQ3bXUqAWCRzsq0Sk 3lAA6jFwe+/w4LE7CiTQRfqRCVYsWaS78V33cTaseOmO1sOVhVb48MrzsPYRZfNKULAK PD2A== 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 :message-id:date:subject:cc:to:from; bh=6nl7sXLMoEUOzJmGLt99kcx188b2tdax/PGO6SEPh1o=; fh=U8K3qHs+T8uVvB/AIq8BBm0skH4usQEfR8seXp8jemM=; b=VauCjlp0RSYl+vwKE8UjOOgYJAaJiFsuRhvhBZz3js7/IHzN1eebxGT3q9OeK2RwNB 5YZdGoFYVOjfhnWtsX75HJgJ33aV/K9RRbm8QOUSRHpgCaTmjmQwMwT1rxf8y9Sv2usJ nZL4UULH4Dssw1DUbXGHndE+jcDqHdbWdVvHnAK16B6jm+iqK5mqKZT7son2yI4+xV5L AxYwAx/MS+GbZQ5ypB1M/cY2hk0t0cU/IPgID5vFVJP7gKVQb24zvPqIrzlsqchKX6wF uNu2e1RMGC/zS5+5IPasZZqIw6qdikj1sl8l8t2tjyqj2zRdGL85lYvFLYns11tjvHaV lM4A== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y12-20020a170902cacc00b001b178baf356si1251012pld.95.2023.07.11.02.34.02; Tue, 11 Jul 2023 02:34:30 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232223AbjGKJZd (ORCPT + 99 others); Tue, 11 Jul 2023 05:25:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231618AbjGKJZE (ORCPT ); Tue, 11 Jul 2023 05:25:04 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8EA111AC for ; Tue, 11 Jul 2023 02:21:02 -0700 (PDT) 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 7897B2B; Tue, 11 Jul 2023 02:21:44 -0700 (PDT) Received: from a077893.arm.com (unknown [10.163.47.87]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 61B123F67D; Tue, 11 Jul 2023 02:21:00 -0700 (PDT) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org Cc: Anshuman Khandual , Catalin Marinas , Will Deacon , linux-kernel@vger.kernel.org Subject: [PATCH] arm64/mm: Directly use ID_AA64MMFR2_EL1_VARange_MASK Date: Tue, 11 Jul 2023 14:50:55 +0530 Message-Id: <20230711092055.245756-1-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 Tools generated register fields have in place mask macros which can be used directly instead of shifting the older right end sided masks. Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- This applies on v6.5-rc1 arch/arm64/kernel/head.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S index 757a0de07f91..7b236994f0e1 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S @@ -113,7 +113,7 @@ SYM_CODE_START(primary_entry) */ #if VA_BITS > 48 mrs_s x0, SYS_ID_AA64MMFR2_EL1 - tst x0, #0xf << ID_AA64MMFR2_EL1_VARange_SHIFT + tst x0, ID_AA64MMFR2_EL1_VARange_MASK mov x0, #VA_BITS mov x25, #VA_BITS_MIN csel x25, x25, x0, eq @@ -756,7 +756,7 @@ SYM_FUNC_START(__cpu_secondary_check52bitva) b.ne 2f mrs_s x0, SYS_ID_AA64MMFR2_EL1 - and x0, x0, #(0xf << ID_AA64MMFR2_EL1_VARange_SHIFT) + and x0, x0, ID_AA64MMFR2_EL1_VARange_MASK cbnz x0, 2f update_early_cpu_boot_status \ -- 2.30.2