Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp527253pxb; Wed, 27 Jan 2021 13:58:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJxKa6f/sT1RoNjwJ1G0JH+sZUcB23UY1d2nJRkpnHS5rUmQWERiBpfq4++IaqKBoLs9sB6U X-Received: by 2002:a05:6402:1819:: with SMTP id g25mr10446947edy.46.1611784716521; Wed, 27 Jan 2021 13:58:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611784716; cv=none; d=google.com; s=arc-20160816; b=QMmSSI1tKTAcwbTx7b11dqdJRfHkkaif20zw4LRrdY9iD42KSQVOdmu7QUduU8YCCh vWbRiOIY45r+mudJBFki4sjxN2oirjQ5P0pDnAXVTgKv9ih3EtlhRfI+TQBmmaxAF6/q MU4MBGxMbhEHImG3ooJ/e5GFD+rWlRmSyIbQ4i5vzqp/6VVPAlS4dB4y/fmZMQG071lC deRX4pxzw8oCWEP7zqDZoGAvt0wZ+k4jYBeZkghNtxQn87ya15bMqlgr3fVdYMZLQ6Fy XN5qMQtVYXh97KwCSDJ4D5OpYUeXKDea3n/4ktpqrxkDB9F8m1HO1mNJdR2HqwiMxPMn 301A== 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=HtZ+V2qN9uRFYwXl4EEPl0DwnU/rYRG8RM1tvVUlu8c=; b=QM2YSY3g5j5eq4SlfqKb/g7dp58WgZaqCmGMkQKSK1GHPrK4Ll/o2LOwYltqK3KFzl l39ctue/XrZzfqzQ7PqRGD+0yVWoTNWuhOjaJUqh8jXGmJxIKQO26qfzAjiTvFsm2xyp 3pDnjZiTfs6id1n87ecVdJLvW5+XWPAAMfLup1DcWWATNk/FE+LL7rc+nYCCYKHApfwj hvEKfKRfk5uAQ0Y8emo/XeVnetPWTz+CW8IUfWMwhzpEi3mxKcRBHq+iedU/lipEVlnW wxYDDkvUYpOUEo3a3tWNSPJGQSymueWNfiIGbCuRDbpeWxKM9GSDsZOOaiEE3WSVbJYU Qn1A== 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 f20si1673737edq.165.2021.01.27.13.58.10; Wed, 27 Jan 2021 13:58:36 -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 S231795AbhA0J6t (ORCPT + 99 others); Wed, 27 Jan 2021 04:58:49 -0500 Received: from foss.arm.com ([217.140.110.172]:32956 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233245AbhA0I7I (ORCPT ); Wed, 27 Jan 2021 03:59:08 -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 B011614F6; Wed, 27 Jan 2021 00:55:52 -0800 (PST) Received: from p8cg001049571a15.arm.com (unknown [10.163.91.246]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 150163F66B; Wed, 27 Jan 2021 00:55:49 -0800 (PST) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org Cc: mathieu.poirier@linaro.org, suzuki.poulose@arm.com, mike.leach@linaro.org, lcherian@marvell.com, linux-kernel@vger.kernel.org, Anshuman Khandual Subject: [PATCH V3 09/14] arm64: Add TRBE definitions Date: Wed, 27 Jan 2021 14:25:33 +0530 Message-Id: <1611737738-1493-10-git-send-email-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611737738-1493-1-git-send-email-anshuman.khandual@arm.com> References: <1611737738-1493-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 V3: - ID_AA64DFR0_TRBE_SHIFT has been moved here from the TRBE driver - Changed TRBLIMITR_TRIG_MODE_SHIFT as 3 arch/arm64/include/asm/sysreg.h | 50 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index 4acff97..85ae4db 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -329,6 +329,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 3 +#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) @@ -831,6 +880,7 @@ #define ID_AA64MMFR2_CNP_SHIFT 0 /* id_aa64dfr0 */ +#define ID_AA64DFR0_TRBE_SHIFT 44 #define ID_AA64DFR0_TRACE_FILT_SHIFT 40 #define ID_AA64DFR0_DOUBLELOCK_SHIFT 36 #define ID_AA64DFR0_PMSVER_SHIFT 32 -- 2.7.4