From patchwork Thu Oct 27 16:55:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 11889 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp347317wru; Thu, 27 Oct 2022 10:02:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6PEH4e0OUC6xoJrQUbbLmsH+Fn1sAqFN3l4xhqzdXit9hIEPJ0vJ8m5J3A15Cgws/oeWcK X-Received: by 2002:a17:90b:1e51:b0:212:d06b:b5fa with SMTP id pi17-20020a17090b1e5100b00212d06bb5famr11080841pjb.171.1666890135852; Thu, 27 Oct 2022 10:02:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666890135; cv=none; d=google.com; s=arc-20160816; b=Z+5zE3F1y+JXBjZ1KyGa4GXUlNzl3lx9YanwKH1v8nafUG1ZuYngFX0V56O0QGGpFZ ERUJ/Jz44yD5sJH9jM/l1gerXfeZs1aB5CSevcAsiq0H5f+CK+ypdgWjo/9JMoSY9zlv bqIVVc/uOMMtW2Gxx7qRJw4byUAzabjyVQUERPnUfchpjFp6MNCGAff/bRjaZmgv194p VnbNz1F6KuD3e1smxTmf+GlBaPvDAMKzKBlNXUKABqTJw5YPUIPHtQRinEllQpgJI6Nc NmlNd01OEkzWUqAwt9x02G6rTJTyyroPP1K4TmADnYt3Q+45McSGZf26ayPUYcYpv1CE LpTg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nEKjVejDvz6ghEfjCPpSgciTDy4pfARqW1t0KlhDGhA=; b=kPzlwK0I8cfQZqfRb/LRjeMplfJ3PhHVi60GN8KQmlLzWa/cnOnJo/cf1OAcZzPJlJ MnksnmEgUSEkF0Z9rnLS88wcZJhSJzLBQtynpZ2/svq3gCxDo1WN1VKFvSEXdhI2u82K c5C9dFg13N5OtpKucTuqvMz7JXYCSigtbNt982xYE4yeSlf9QHKT9uKsQXOClR06bArC qcbUsvQYnUS39p0EPrJYZHAYnqrV1bMmDKxGCCQhM+JMsHGIeRZZgEz39An8lKqoLnl2 Olw6WDtaRMNlw+FeTxyoLA+gJWNSww9QYdFjjY71catKwDIcrZS5b8Twf6k2PtFDUbjY lpDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Xu9Kdzr4; 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=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ck1-20020a17090afe0100b002007cc304f3si6041085pjb.60.2022.10.27.10.01.54; Thu, 27 Oct 2022 10:02:15 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Xu9Kdzr4; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236825AbiJ0RBo (ORCPT + 99 others); Thu, 27 Oct 2022 13:01:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236807AbiJ0RBk (ORCPT ); Thu, 27 Oct 2022 13:01:40 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D9F31911D5; Thu, 27 Oct 2022 10:01:35 -0700 (PDT) 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 A799BB82716; Thu, 27 Oct 2022 17:01:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F414EC433C1; Thu, 27 Oct 2022 17:01:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666890093; bh=9Ab+7kjacFVu0GE7LCnthBKvDfAV+vHoprFlEc2CDkU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xu9Kdzr45EmB0MYUCfUYep9a0KhIcmZLvGrqHjmCJuakXgwT0En0Myj4J7w+mhb00 4oSggMrjUhC62hVeWNfjfP5PNgNGObWcwd4Bihj+Lo2dXyxF5Z8D10dg7lJDc7V4Ye o0pBySKZu7dhehWLfgKi+8shxS+6qDTIezVfpgCk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Anshuman Khandual , Evgenii Stepanov Subject: [PATCH 5.15 02/79] arm64/mm: Consolidate TCR_EL1 fields Date: Thu, 27 Oct 2022 18:55:00 +0200 Message-Id: <20221027165055.004242716@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221027165054.917467648@linuxfoundation.org> References: <20221027165054.917467648@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.6 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747860991081323136?= X-GMAIL-MSGID: =?utf-8?q?1747860991081323136?= From: Anshuman Khandual commit e921da6bc7cac5f0e8458fe5df18ae08eb538f54 upstream. This renames and moves SYS_TCR_EL1_TCMA1 and SYS_TCR_EL1_TCMA0 definitions into pgtable-hwdef.h thus consolidating all TCR fields in a single header. This does not cause any functional change. Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Acked-by: Catalin Marinas Signed-off-by: Anshuman Khandual Link: https://lore.kernel.org/r/1643121513-21854-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Will Deacon Cc: Evgenii Stepanov Signed-off-by: Greg Kroah-Hartman --- arch/arm64/include/asm/pgtable-hwdef.h | 2 ++ arch/arm64/include/asm/sysreg.h | 4 ---- arch/arm64/mm/proc.S | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) --- a/arch/arm64/include/asm/pgtable-hwdef.h +++ b/arch/arm64/include/asm/pgtable-hwdef.h @@ -273,6 +273,8 @@ #define TCR_NFD1 (UL(1) << 54) #define TCR_E0PD0 (UL(1) << 55) #define TCR_E0PD1 (UL(1) << 56) +#define TCR_TCMA0 (UL(1) << 57) +#define TCR_TCMA1 (UL(1) << 58) /* * TTBR. --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -1094,10 +1094,6 @@ #define CPACR_EL1_ZEN_EL0EN (BIT(17)) /* enable EL0 access, if EL1EN set */ #define CPACR_EL1_ZEN (CPACR_EL1_ZEN_EL1EN | CPACR_EL1_ZEN_EL0EN) -/* TCR EL1 Bit Definitions */ -#define SYS_TCR_EL1_TCMA1 (BIT(58)) -#define SYS_TCR_EL1_TCMA0 (BIT(57)) - /* GCR_EL1 Definitions */ #define SYS_GCR_EL1_RRND (BIT(16)) #define SYS_GCR_EL1_EXCL_MASK 0xffffUL --- a/arch/arm64/mm/proc.S +++ b/arch/arm64/mm/proc.S @@ -46,7 +46,7 @@ #endif #ifdef CONFIG_KASAN_HW_TAGS -#define TCR_MTE_FLAGS SYS_TCR_EL1_TCMA1 | TCR_TBI1 | TCR_TBID1 +#define TCR_MTE_FLAGS TCR_TCMA1 | TCR_TBI1 | TCR_TBID1 #else /* * The mte_zero_clear_page_tags() implementation uses DC GZVA, which relies on