Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5660772pxu; Wed, 23 Dec 2020 02:07:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJxbWo0TY5v6ZVRQo73b9xnFzx+ZZo3shIL5RNP925MqSKfvxXkoddfT1hhYf+yn+upQTXnB X-Received: by 2002:a17:906:ce2b:: with SMTP id sd11mr23663953ejb.334.1608718041974; Wed, 23 Dec 2020 02:07:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608718041; cv=none; d=google.com; s=arc-20160816; b=UK5WeTfJ09s2LjHQwOrh9OqMSP1wqxkD+Lc9yxUrGGucdCAMl1TOxmMQj3lcGNFGoe KDbFvJrHsXFhJZa4+JZDo6MTPbLzpIfTqQ75U3nR+qK2ZmeAVTnydYkc18yx2QAaASKW 2/8qMEw4tMWkEYyg5xt8RYzWGycsXtjc1ZT9K0ARCKiHHH7ieSuvacrT3jeUz9yWdaM8 ryyzJO740U6A2zm01M9WNIzGDK9hQAhfNo956/KRDxcisLTf4FK10x7sl7CR2HBJHW/N wE3WrA6VIPmExyENiQLtVxzDhgkZAKN7NpJwdKm1iVSoWWjRh43DbIfuIjqsQyYwScBX CdIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=Bv1SK2uKeYOHwrE2U0GLV1YA8D4cJcjljO1ki81g1GY=; b=sI0UoNWwOlmUL4MbQ+lLyymfhIKZguWs8HELYXIMk0U/85FPP8rNCPnTEymgIWMenR v2Ge2RAqnoRjXaiyqQEu9r2NgmCkMrUdpoIB8s1trDkwS0Kd7M0EjgFCFcQYwDw6Tdut 3o9yqmOpS8xGvg+shT6CyX+dPHKSD3WdjBrABsTwi08SUYHy4cQ4b7BTZlzBFNJUynUs 9JYtImeRW1vEvQtq5mfyN07duQT7H+MVzKTaC0iABwCxI3EFgu6zzbcPW1nqieV9D5a1 JGaAL9imjZ+AqO8yepG+ZPwW/XnFZfMFzLDhgE1wRNNUAqRPi6mwGfoM3LwPBm0Akiza nWXQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bt28si13547859edb.269.2020.12.23.02.06.59; Wed, 23 Dec 2020 02:07:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728477AbgLWKFR (ORCPT + 99 others); Wed, 23 Dec 2020 05:05:17 -0500 Received: from foss.arm.com ([217.140.110.172]:48054 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728443AbgLWKFP (ORCPT ); Wed, 23 Dec 2020 05:05:15 -0500 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 655FB1477; Wed, 23 Dec 2020 02:04:04 -0800 (PST) Received: from p8cg001049571a15.blr.arm.com (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id A5F483F718; Wed, 23 Dec 2020 02:04:01 -0800 (PST) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org Cc: linux-kernel@vger.kernel.org, Anshuman Khandual , Mathieu Poirier , Suzuki K Poulose , Mike Leach , Linu Cherian Subject: [PATCH 07/11] arm64: Add TRBE definitions Date: Wed, 23 Dec 2020 15:33:39 +0530 Message-Id: <1608717823-18387-8-git-send-email-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1608717823-18387-1-git-send-email-anshuman.khandual@arm.com> References: <1608717823-18387-1-git-send-email-anshuman.khandual@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This adds TRBE related registers and corresponding feature macros. Cc: Mathieu Poirier Cc: Mike Leach Cc: Suzuki K Poulose Signed-off-by: Anshuman Khandual --- Changes in V1: - Re-arranged TRBE register definitions per existing sorted registers - Replaced some instances with BIT() and GENMASK_ULL() when applicable arch/arm64/include/asm/sysreg.h | 49 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index eeaab55..e6962b1 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -325,6 +325,55 @@ /*** End of Statistical Profiling Extension ***/ +/* + * TRBE Registers + */ +#define SYS_TRBLIMITR_EL1 sys_reg(3, 0, 9, 11, 0) +#define SYS_TRBPTR_EL1 sys_reg(3, 0, 9, 11, 1) +#define SYS_TRBBASER_EL1 sys_reg(3, 0, 9, 11, 2) +#define SYS_TRBSR_EL1 sys_reg(3, 0, 9, 11, 3) +#define SYS_TRBMAR_EL1 sys_reg(3, 0, 9, 11, 4) +#define SYS_TRBTRG_EL1 sys_reg(3, 0, 9, 11, 6) +#define SYS_TRBIDR_EL1 sys_reg(3, 0, 9, 11, 7) + +#define TRBLIMITR_LIMIT_MASK GENMASK_ULL(51, 0) +#define TRBLIMITR_LIMIT_SHIFT 12 +#define TRBLIMITR_NVM BIT(5) +#define TRBLIMITR_TRIG_MODE_MASK GENMASK(1, 0) +#define TRBLIMITR_TRIG_MODE_SHIFT 2 +#define TRBLIMITR_FILL_MODE_MASK GENMASK(1, 0) +#define TRBLIMITR_FILL_MODE_SHIFT 1 +#define TRBLIMITR_ENABLE BIT(0) +#define TRBPTR_PTR_MASK GENMASK_ULL(63, 0) +#define TRBPTR_PTR_SHIFT 0 +#define TRBBASER_BASE_MASK GENMASK_ULL(51, 0) +#define TRBBASER_BASE_SHIFT 12 +#define TRBSR_EC_MASK GENMASK(5, 0) +#define TRBSR_EC_SHIFT 26 +#define TRBSR_IRQ BIT(22) +#define TRBSR_TRG BIT(21) +#define TRBSR_WRAP BIT(20) +#define TRBSR_ABORT BIT(18) +#define TRBSR_STOP BIT(17) +#define TRBSR_MSS_MASK GENMASK(15, 0) +#define TRBSR_MSS_SHIFT 0 +#define TRBSR_BSC_MASK GENMASK(5, 0) +#define TRBSR_BSC_SHIFT 0 +#define TRBSR_FSC_MASK GENMASK(5, 0) +#define TRBSR_FSC_SHIFT 0 +#define TRBMAR_SHARE_MASK GENMASK(1, 0) +#define TRBMAR_SHARE_SHIFT 8 +#define TRBMAR_OUTER_MASK GENMASK(3, 0) +#define TRBMAR_OUTER_SHIFT 4 +#define TRBMAR_INNER_MASK GENMASK(3, 0) +#define TRBMAR_INNER_SHIFT 0 +#define TRBTRG_TRG_MASK GENMASK(31, 0) +#define TRBTRG_TRG_SHIFT 0 +#define TRBIDR_FLAG BIT(5) +#define TRBIDR_PROG BIT(4) +#define TRBIDR_ALIGN_MASK GENMASK(3, 0) +#define TRBIDR_ALIGN_SHIFT 0 + #define SYS_PMINTENSET_EL1 sys_reg(3, 0, 9, 14, 1) #define SYS_PMINTENCLR_EL1 sys_reg(3, 0, 9, 14, 2) -- 2.7.4