From patchwork Mon Feb 1 18:13:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 12060079 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AFBD0C433E0 for ; Mon, 1 Feb 2021 21:12:14 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4FED860232 for ; Mon, 1 Feb 2021 21:12:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4FED860232 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YigJs0raoEClOvO5LkhuJXqqPYkBRdJ9tTi6odKQjGM=; b=w8g8sJk0Ro6IRuL/bSfR1u2ic KlTXiWYkOf30cAXwuC5GEza7VjC10jdXrONE4BHW7MmfFJ1MRw9suwGwyusQ9gKEUZI8HxzzhYDpX avEMzcBx6zfjf/AD7a+AcORHKtySVfu/AdG8PZrlMU6/If3NnxvVRu/Um0DOPw9n02efFQFJ1kL1H TuAA76YX9a44w0zwdWIQ4HK6Po+v1XI93VNvOE9MXr1KLq7PlUP8qTBsH7jO5A/JABvV/dw9stNX1 DoalH1g1/akFbmhWINI9sR6Gr4oASb1hS3NDAe6vdH1b/Rtt7howh/4TAWV2ZjpFFbKCNsgL8Ew0C rqA6Yy7tA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l6drs-0007hh-To; Mon, 01 Feb 2021 18:24:09 +0000 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l6diU-0003Av-Ft for linux-arm-kernel@lists.infradead.org; Mon, 01 Feb 2021 18:14:38 +0000 Received: by mail-pf1-x42f.google.com with SMTP id o20so12161506pfu.0 for ; Mon, 01 Feb 2021 10:14:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GFqKuZ77avnBtk4IXulMi5+rMq2IVk2aYxin4FMvrHc=; b=tNNaYYA/FAcx8YboDKjEYK/Wz/LrfjztgM5lacaRKXdWUchh2exQCqCnSGcd4pwP/J x883SkfZtJXTAa7Ums8VNSySNpP+avQLDWK3tE0isDG69mbmsZZ+cmBCJoFIGzye5kmI /dQYBzVFq4IaupP2yakuWg7qslDt7+4hGuvQ4LHzF4oxG6ge3jZqFo1oxW1e7YcQ/DOZ 4vz+iFW7DLx0JZwZwxaqj4dm0ucOirZNsXByPCWnqC3QQlvRBw1q1eOXPl+W895PJTxa l1ORRKEttD/18O0eoI7b2T0XqM2wTWlpjNreTQftgW5K2nVl6mlM8cwCecZNPo/bYgGs XHkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GFqKuZ77avnBtk4IXulMi5+rMq2IVk2aYxin4FMvrHc=; b=ofBl+WTLunqnPNi1mpwu1p6E3zld/3uXGSiyZnQYFpEIUihFVkG1EnsAB1kGdrkb9Q +go1i6+sykkqLRI9+2v+lMfnLsNldaLoqlhbgQvpTcV5an3pbIzyBSMECLtKiInD37YG O6nxNWLnTybp+GKiML0On9zsVQvxcXIIe1nIhrcJBXbIK745n1gOiDE95ysSSJuFMwNH NzdPxl3kuTECJe04K3iu0qaM7UlBFcnVe7ERB/vqfY/O8JGDdnKRWWouIsWe3YMiMooe Bzvb420CVJ3fpnhR0CDPRFyHG9dPIYJlNtrxdMcYnexZrhduACRZc5lOmPg8oddae7ly YPHA== X-Gm-Message-State: AOAM530iZbyViBRg04n6tNaYGub4xxzZnmYdSK+rSFRFQMe3LT7R7psX paXT3pjDjxhFlbm7oS6F88poHQ== X-Google-Smtp-Source: ABdhPJydvY3uPmmMFUTcp+l1QuiF/pjOU53aOlMUba7lcWpTTYa8bHT6ZxhKjX7IFLTet5G927uiKA== X-Received: by 2002:a65:498e:: with SMTP id r14mr18021647pgs.235.1612203264546; Mon, 01 Feb 2021 10:14:24 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id e12sm75784pjj.23.2021.02.01.10.14.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Feb 2021 10:14:23 -0800 (PST) From: Mathieu Poirier To: gregkh@linuxfoundation.org Subject: [PATCH 29/31] arm64: Add TRFCR_ELx definitions Date: Mon, 1 Feb 2021 11:13:49 -0700 Message-Id: <20210201181351.1475223-30-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210201181351.1475223-1-mathieu.poirier@linaro.org> References: <20210201181351.1475223-1-mathieu.poirier@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210201_131426_659859_F68FBF00 X-CRM114-Status: GOOD ( 13.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Jonathan Zhou Add definitions for the Arm v8.4 SelfHosted trace extensions registers. Acked-by: Catalin Marinas Cc: Will Deacon Signed-off-by: Jonathan Zhou [ split the register definitions to separate patch rename some of the symbols ] Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20210110224850.1880240-28-suzuki.poulose@arm.com Signed-off-by: Mathieu Poirier --- arch/arm64/include/asm/sysreg.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index 8b5e7e5c3cc8..4acff97519b9 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -191,6 +191,7 @@ #define SYS_GCR_EL1 sys_reg(3, 0, 1, 0, 6) #define SYS_ZCR_EL1 sys_reg(3, 0, 1, 2, 0) +#define SYS_TRFCR_EL1 sys_reg(3, 0, 1, 2, 1) #define SYS_TTBR0_EL1 sys_reg(3, 0, 2, 0, 0) #define SYS_TTBR1_EL1 sys_reg(3, 0, 2, 0, 1) @@ -471,6 +472,7 @@ #define SYS_SCTLR_EL2 sys_reg(3, 4, 1, 0, 0) #define SYS_ZCR_EL2 sys_reg(3, 4, 1, 2, 0) +#define SYS_TRFCR_EL2 sys_reg(3, 4, 1, 2, 1) #define SYS_DACR32_EL2 sys_reg(3, 4, 3, 0, 0) #define SYS_SPSR_EL2 sys_reg(3, 4, 4, 0, 0) #define SYS_ELR_EL2 sys_reg(3, 4, 4, 0, 1) @@ -829,6 +831,7 @@ #define ID_AA64MMFR2_CNP_SHIFT 0 /* id_aa64dfr0 */ +#define ID_AA64DFR0_TRACE_FILT_SHIFT 40 #define ID_AA64DFR0_DOUBLELOCK_SHIFT 36 #define ID_AA64DFR0_PMSVER_SHIFT 32 #define ID_AA64DFR0_CTX_CMPS_SHIFT 28 @@ -1003,6 +1006,14 @@ /* Safe value for MPIDR_EL1: Bit31:RES1, Bit30:U:0, Bit24:MT:0 */ #define SYS_MPIDR_SAFE_VAL (BIT(31)) +#define TRFCR_ELx_TS_SHIFT 5 +#define TRFCR_ELx_TS_VIRTUAL ((0x1UL) << TRFCR_ELx_TS_SHIFT) +#define TRFCR_ELx_TS_GUEST_PHYSICAL ((0x2UL) << TRFCR_ELx_TS_SHIFT) +#define TRFCR_ELx_TS_PHYSICAL ((0x3UL) << TRFCR_ELx_TS_SHIFT) +#define TRFCR_EL2_CX BIT(3) +#define TRFCR_ELx_ExTRE BIT(1) +#define TRFCR_ELx_E0TRE BIT(0) + #ifdef __ASSEMBLY__ .irp num,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30