From patchwork Fri Jun 2 06:25:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 102319 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp831732vqr; Thu, 1 Jun 2023 23:37:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7f06BsSwIRdBat+e7Lcx5yLlnooPPCe9z25Yjjk8wxgBszadKNg2uuC+QPfN+7yzvbNBpq X-Received: by 2002:a05:6a21:6da3:b0:10d:5390:ea90 with SMTP id wl35-20020a056a216da300b0010d5390ea90mr9433121pzb.59.1685687857877; Thu, 01 Jun 2023 23:37:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685687857; cv=none; d=google.com; s=arc-20160816; b=aqLRkmDRTMd4zpZatxmPjYf6meUxjSmYYdWvTXNTbYcbQpv01/G3RnOkRoPo2zfz5e S26j2hLeWSxiKyoV0MIZV6ns3anLaG8fu/sII4pCcu+OTOFV1wXaC97mqYONy4GGoJ1/ Ue9greEffTCTehSsco95JCwQkkOvJqNWF58T5jPC02tCDKONAAzUh4jDx85FIF7gfjMG XhA1g5g7qpPV5H7c+UK86MhrqDB/XEgLmzQZkku073AAWJZ8jFBBLTrni+Jud8xUTOZn t09CriruQRFMurjH9o+d/B9EismEbx5QtizeVEv8O4nuiTKcPsOmb7BnRk+DsCbUQlxn MZwQ== 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; bh=Fs7AYq/4X9tCM+KnAUd9oRfMUVxD1owi6UJaEPqC+RU=; b=O+ApePoqGHxUpFvlSf+ZuAGyZMX3JoJ26UHzjxSG7OOyC+gqqflKf7HXMOFRxrtniF GO3VjSrHSlcC91XPoDFnbwFQU9yD/z6d72xyH8OMAbXTfW/3/doXoN5RUTQLpGQ5UuUa IdlH+vl20YyEG0jHS0fjkEf0/RzXfIYqdl+Gzx18JapTFCqnKG08fPUQyfgyYQ8c7GnQ SO+1AaBCr28zxYfl1w5U6jsRdPQqWShs9TA3n0IdqXsQtqZ/pL2wgTo5QlHCfGug7ndh gVyVNLhGaxrLTkxhuEBTxis+EM5W1kcKQxzcK9EXjhc+Xjxtf8ZOCwiqw5nCJ2qmnTov SUPw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e12-20020a17090301cc00b001ac9a3ebb38si392592plh.360.2023.06.01.23.37.22; Thu, 01 Jun 2023 23:37:37 -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 S233761AbjFBG0g (ORCPT + 99 others); Fri, 2 Jun 2023 02:26:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233808AbjFBG0W (ORCPT ); Fri, 2 Jun 2023 02:26:22 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CC9B11B3 for ; Thu, 1 Jun 2023 23:26:19 -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 F32A31042; Thu, 1 Jun 2023 23:27:04 -0700 (PDT) Received: from a077893.blr.arm.com (unknown [10.162.41.6]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 73D6F3F67D; Thu, 1 Jun 2023 23:26:15 -0700 (PDT) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org, broonie@kernel.org Cc: Anshuman Khandual , Catalin Marinas , Will Deacon , Marc Zyngier , Rob Herring , Suzuki K Poulose , James Morse , kvmarm@lists.linux.dev, coresight@lists.linaro.org, linux-kernel@vger.kernel.org Subject: [PATCH V2 03/14] arm64/sysreg: Rename TRBBASER_EL1 fields per auto-gen tools format Date: Fri, 2 Jun 2023 11:55:41 +0530 Message-Id: <20230602062552.565992-4-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230602062552.565992-1-anshuman.khandual@arm.com> References: <20230602062552.565992-1-anshuman.khandual@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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?1767571831545174289?= X-GMAIL-MSGID: =?utf-8?q?1767571831545174289?= This renames TRBBASER_EL1 register fields per auto-gen tools format without causing any functional change in the TRBE driver. Cc: Catalin Marinas Cc: Will Deacon Cc: Marc Zyngier Cc: Mark Brown Cc: Rob Herring Cc: Suzuki K Poulose Cc: James Morse Cc: kvmarm@lists.linux.dev Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/arm64/include/asm/sysreg.h | 4 ++-- drivers/hwtracing/coresight/coresight-trbe.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index 2cb1078bc67f..9b2d1c6faf13 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -256,8 +256,8 @@ #define TRBLIMITR_EL1_E BIT(0) #define TRBPTR_EL1_PTR_MASK GENMASK_ULL(63, 0) #define TRBPTR_EL1_PTR_SHIFT 0 -#define TRBBASER_BASE_MASK GENMASK_ULL(51, 0) -#define TRBBASER_BASE_SHIFT 12 +#define TRBBASER_EL1_BASE_MASK GENMASK_ULL(63, 12) +#define TRBBASER_EL1_BASE_SHIFT 12 #define TRBSR_EC_MASK GENMASK(5, 0) #define TRBSR_EC_SHIFT 26 #define TRBSR_IRQ BIT(22) diff --git a/drivers/hwtracing/coresight/coresight-trbe.h b/drivers/hwtracing/coresight/coresight-trbe.h index 8ea7079d60bb..0b73d9d10aa8 100644 --- a/drivers/hwtracing/coresight/coresight-trbe.h +++ b/drivers/hwtracing/coresight/coresight-trbe.h @@ -131,7 +131,7 @@ static inline unsigned long get_trbe_limit_pointer(void) static inline unsigned long get_trbe_base_pointer(void) { u64 trbbaser = read_sysreg_s(SYS_TRBBASER_EL1); - unsigned long addr = trbbaser & (TRBBASER_BASE_MASK << TRBBASER_BASE_SHIFT); + unsigned long addr = trbbaser & TRBBASER_EL1_BASE_MASK; WARN_ON(!IS_ALIGNED(addr, PAGE_SIZE)); return addr; @@ -140,7 +140,7 @@ static inline unsigned long get_trbe_base_pointer(void) static inline void set_trbe_base_pointer(unsigned long addr) { WARN_ON(is_trbe_enabled()); - WARN_ON(!IS_ALIGNED(addr, (1UL << TRBBASER_BASE_SHIFT))); + WARN_ON(!IS_ALIGNED(addr, (1UL << TRBBASER_EL1_BASE_SHIFT))); WARN_ON(!IS_ALIGNED(addr, PAGE_SIZE)); write_sysreg_s(addr, SYS_TRBBASER_EL1); }