From patchwork Wed Jun 14 06:59:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 107748 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1053333vqr; Wed, 14 Jun 2023 00:16:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6au7bknCa9T3mtbni1QrXPqFUAZNr87EBWE5drJfJMcpZDHB/DEbVh68vagwNVxPSCk46k X-Received: by 2002:a50:fb12:0:b0:514:9e61:e7bc with SMTP id d18-20020a50fb12000000b005149e61e7bcmr8546854edq.0.1686726963265; Wed, 14 Jun 2023 00:16:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686726963; cv=none; d=google.com; s=arc-20160816; b=VxguNgUq3ninW9u1lV69H/HP5bgu6N6SK1kJ2DTX3eyoDw4TdnkKZ8BcPY1+nRd1PC FgiNRNxwgjoIHkiNTd3oH5nkdb5xVbUrpgMzAEgFmAYzCyGDqB152xjdh87NtTj05Ut9 3Prj4Zr+kRcIjD0TgYfIkVFvECRAF/wTsowucrDzf0jHNrOfRQhvBJQUBEs90xXmpBu5 rtWGMr1ULe69sqJ0rifND79ywGp/vbCnqZmicFOG8vbrjqMWIFjHcptx0B5ap2dPImY4 PbUgOYgiKxlWD2BgNiaezxDWE5H6tBjO5cHRZz9oA4v4Vam/HG/LWE1eWOPDihYrS1V/ QHoA== 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=eJ3/S8tBmRYmQoLk9lHzGe0/LR0cG4aaQyNEigZTJUE=; b=lj75T186ibwEFdZtIYVn5WmlCqhSNaCUTQo1rwj2zjHR1Ctu1BipNmOVwgsY0ZkRtQ NZxsZhMfTiD5rS2EmJOK/C3PkbyOzhQeZEvfR8ObSa8dAyWihdlshnkh2RYm44H5cCDB +xs83pOd+3y/DB8m/Z8fdIcVyADrZB+zkdT5nVyBOEohdEKaV+Pl+KUSYA5kxpw/ADWt iWi8PwRaJqktMyAav1RCMFcvhEMNUXX6Z6dLLlZkorVxMyNpQgHCXE5Ow4TdJ4vl0F19 DamZDnYE7Za1S7s8yU6bokE5LGVPzZ7gmIvgoGUYzU+JUvhY6cZdhgj5OGY0szba7KoE jFLg== 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 k16-20020a056402049000b00514a5f8d30bsi8132529edv.656.2023.06.14.00.15.38; Wed, 14 Jun 2023 00:16:03 -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 S242991AbjFNHAh (ORCPT + 99 others); Wed, 14 Jun 2023 03:00:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238512AbjFNHA3 (ORCPT ); Wed, 14 Jun 2023 03:00:29 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9E6D91996 for ; Wed, 14 Jun 2023 00:00:24 -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 CF3631FB; Wed, 14 Jun 2023 00:01:08 -0700 (PDT) Received: from a077893.arm.com (unknown [10.163.46.15]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 580863F663; Wed, 14 Jun 2023 00:00:18 -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 V3 03/14] arm64/sysreg: Rename TRBBASER_EL1 fields per auto-gen tools format Date: Wed, 14 Jun 2023 12:29:38 +0530 Message-Id: <20230614065949.146187-4-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230614065949.146187-1-anshuman.khandual@arm.com> References: <20230614065949.146187-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?1768661412696481493?= X-GMAIL-MSGID: =?utf-8?q?1768661412696481493?= 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 b7a0d7d0f4d6..896b9b6334b4 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -262,8 +262,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); }