From patchwork Wed Jun 14 06:59:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 107736 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1047926vqr; Wed, 14 Jun 2023 00:03:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4VOd+IpYIJmRCWO3w+5L4yPEgaRU0H5U8uZBcBuh7za4KV4lZYqrzTVALYh2ATIks4F4HU X-Received: by 2002:a05:6808:150d:b0:398:2db1:dc26 with SMTP id u13-20020a056808150d00b003982db1dc26mr10750748oiw.31.1686726218827; Wed, 14 Jun 2023 00:03:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686726218; cv=none; d=google.com; s=arc-20160816; b=WoZuys+fWBye2GpVy/8IWcKYbrGtkJnuAn00Z+q/c+RF2Cl+g3tawO5R/otXhlmZR6 Pr07gUlGsvItv2NSLU5zNRjBu74JW959iAHPpjfsJ0fLKJI44MEbzxfaPAYL2jc/5cLz zuvPkiVUoNvVgL8D3WndgNNUCKFEY0la1kJqph3lD5HDbA7BWhbq6aKWRkTkzN4TgALE JxhVj2eWZaMIqw3KiOdLXPWy2D9uhNF449EKoGqGby8bJ0MMZAF3Lr2/N+osZyFPoouc 9SSRI2oN7oOV6SuQ8ZgPYPIgDIwXSE+Oxw2M5ywUD/Ap1CiGflTuak9PSbLf1Mf50XXl QsmA== 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=3u3jCKwbXo2myp8vlf3uzZUQovkiGmBiP4RbVLWxBg4=; b=cWDAt4SpRci8PVIYQ7rj4OJeIBsxo3wL9NhqF1X+wNwwkJoORZmJbromBoNGNnFB9q zrMeOgJ1ovsHb56vg+aKAF+1lWZetlt8bL58yzBHsCd3dy8X50JDJOQO8anK1LMgmYmh vWDtcdiRftLsNo6q8rsxYiH6ZBesMvXqXUeH9P+2v8vEqiOHPSYalqB3vFFp6AdXidit XqmN6wcnlQux0Cy5509vtcCn+nTBBHSNMkOe8iE+0F1EpHzbaeDkiXF5Ce6Q2tg5/CQW SFRHEr7JKdZdlAMeO0bTofE7rKcjZLQXhdmpkpl/8TNk2GsdgPWYwUv1zLzxJ8Ssxup2 Bbpg== 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 i10-20020a639d0a000000b005440e9ee0b2si6835575pgd.569.2023.06.14.00.03.25; Wed, 14 Jun 2023 00:03:38 -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 S238477AbjFNHAR (ORCPT + 99 others); Wed, 14 Jun 2023 03:00:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238476AbjFNHAP (ORCPT ); Wed, 14 Jun 2023 03:00:15 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A90B41996 for ; Wed, 14 Jun 2023 00:00:13 -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 E93092F4; Wed, 14 Jun 2023 00:00:57 -0700 (PDT) Received: from a077893.arm.com (unknown [10.163.46.15]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 55B163F663; Wed, 14 Jun 2023 00:00:09 -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 01/14] arm64/sysreg: Rename TRBLIMITR_EL1 fields per auto-gen tools format Date: Wed, 14 Jun 2023 12:29:36 +0530 Message-Id: <20230614065949.146187-2-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?1768660631899491021?= X-GMAIL-MSGID: =?utf-8?q?1768660631899491021?= This renames TRBLIMITR_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 | 16 +++++++-------- arch/arm64/kvm/hyp/nvhe/debug-sr.c | 2 +- drivers/hwtracing/coresight/coresight-trbe.c | 21 ++++++++++---------- drivers/hwtracing/coresight/coresight-trbe.h | 7 ++++--- 4 files changed, 24 insertions(+), 22 deletions(-) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index eefd712f2430..1be3a44b8289 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -252,14 +252,14 @@ #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 TRBLIMITR_EL1_LIMIT_MASK GENMASK_ULL(63, 12) +#define TRBLIMITR_EL1_LIMIT_SHIFT 12 +#define TRBLIMITR_EL1_nVM BIT(5) +#define TRBLIMITR_EL1_TM_MASK GENMASK(4, 3) +#define TRBLIMITR_EL1_TM_SHIFT 3 +#define TRBLIMITR_EL1_FM_MASK GENMASK(2, 1) +#define TRBLIMITR_EL1_FM_SHIFT 1 +#define TRBLIMITR_EL1_E BIT(0) #define TRBPTR_PTR_MASK GENMASK_ULL(63, 0) #define TRBPTR_PTR_SHIFT 0 #define TRBBASER_BASE_MASK GENMASK_ULL(51, 0) diff --git a/arch/arm64/kvm/hyp/nvhe/debug-sr.c b/arch/arm64/kvm/hyp/nvhe/debug-sr.c index d756b939f296..4558c02eb352 100644 --- a/arch/arm64/kvm/hyp/nvhe/debug-sr.c +++ b/arch/arm64/kvm/hyp/nvhe/debug-sr.c @@ -56,7 +56,7 @@ static void __debug_save_trace(u64 *trfcr_el1) *trfcr_el1 = 0; /* Check if the TRBE is enabled */ - if (!(read_sysreg_s(SYS_TRBLIMITR_EL1) & TRBLIMITR_ENABLE)) + if (!(read_sysreg_s(SYS_TRBLIMITR_EL1) & TRBLIMITR_EL1_E)) return; /* * Prohibit trace generation while we are in guest. diff --git a/drivers/hwtracing/coresight/coresight-trbe.c b/drivers/hwtracing/coresight/coresight-trbe.c index 1fc4fd79a1c6..1d9d141c62e9 100644 --- a/drivers/hwtracing/coresight/coresight-trbe.c +++ b/drivers/hwtracing/coresight/coresight-trbe.c @@ -218,7 +218,7 @@ static inline void set_trbe_enabled(struct trbe_cpudata *cpudata, u64 trblimitr) * Enable the TRBE without clearing LIMITPTR which * might be required for fetching the buffer limits. */ - trblimitr |= TRBLIMITR_ENABLE; + trblimitr |= TRBLIMITR_EL1_E; write_sysreg_s(trblimitr, SYS_TRBLIMITR_EL1); /* Synchronize the TRBE enable event */ @@ -236,7 +236,7 @@ static inline void set_trbe_disabled(struct trbe_cpudata *cpudata) * Disable the TRBE without clearing LIMITPTR which * might be required for fetching the buffer limits. */ - trblimitr &= ~TRBLIMITR_ENABLE; + trblimitr &= ~TRBLIMITR_EL1_E; write_sysreg_s(trblimitr, SYS_TRBLIMITR_EL1); if (trbe_needs_drain_after_disable(cpudata)) @@ -596,13 +596,13 @@ static void set_trbe_limit_pointer_enabled(struct trbe_buf *buf) u64 trblimitr = read_sysreg_s(SYS_TRBLIMITR_EL1); unsigned long addr = buf->trbe_limit; - WARN_ON(!IS_ALIGNED(addr, (1UL << TRBLIMITR_LIMIT_SHIFT))); + WARN_ON(!IS_ALIGNED(addr, (1UL << TRBLIMITR_EL1_LIMIT_SHIFT))); WARN_ON(!IS_ALIGNED(addr, PAGE_SIZE)); - trblimitr &= ~TRBLIMITR_NVM; - trblimitr &= ~(TRBLIMITR_FILL_MODE_MASK << TRBLIMITR_FILL_MODE_SHIFT); - trblimitr &= ~(TRBLIMITR_TRIG_MODE_MASK << TRBLIMITR_TRIG_MODE_SHIFT); - trblimitr &= ~(TRBLIMITR_LIMIT_MASK << TRBLIMITR_LIMIT_SHIFT); + trblimitr &= ~TRBLIMITR_EL1_nVM; + trblimitr &= ~TRBLIMITR_EL1_FM_MASK; + trblimitr &= ~TRBLIMITR_EL1_TM_MASK; + trblimitr &= ~TRBLIMITR_EL1_LIMIT_MASK; /* * Fill trace buffer mode is used here while configuring the @@ -613,14 +613,15 @@ static void set_trbe_limit_pointer_enabled(struct trbe_buf *buf) * trace data in the interrupt handler, before reconfiguring * the TRBE. */ - trblimitr |= (TRBE_FILL_MODE_FILL & TRBLIMITR_FILL_MODE_MASK) << TRBLIMITR_FILL_MODE_SHIFT; + trblimitr |= (TRBLIMITR_EL1_FM_FILL << TRBLIMITR_EL1_FM_SHIFT) & + TRBLIMITR_EL1_FM_MASK; /* * Trigger mode is not used here while configuring the TRBE for * the trace capture. Hence just keep this in the ignore mode. */ - trblimitr |= (TRBE_TRIG_MODE_IGNORE & TRBLIMITR_TRIG_MODE_MASK) << - TRBLIMITR_TRIG_MODE_SHIFT; + trblimitr |= (TRBLIMITR_EL1_TM_IGNR << TRBLIMITR_EL1_TM_SHIFT) & + TRBLIMITR_EL1_TM_MASK; trblimitr |= (addr & PAGE_MASK); set_trbe_enabled(buf->cpudata, trblimitr); } diff --git a/drivers/hwtracing/coresight/coresight-trbe.h b/drivers/hwtracing/coresight/coresight-trbe.h index 98ff1b17ad07..8ea7079d60bb 100644 --- a/drivers/hwtracing/coresight/coresight-trbe.h +++ b/drivers/hwtracing/coresight/coresight-trbe.h @@ -30,7 +30,7 @@ static inline bool is_trbe_enabled(void) { u64 trblimitr = read_sysreg_s(SYS_TRBLIMITR_EL1); - return trblimitr & TRBLIMITR_ENABLE; + return trblimitr & TRBLIMITR_EL1_E; } #define TRBE_EC_OTHERS 0 @@ -86,8 +86,9 @@ static inline bool is_trbe_running(u64 trbsr) #define TRBE_TRIG_MODE_STOP 0 #define TRBE_TRIG_MODE_IRQ 1 -#define TRBE_TRIG_MODE_IGNORE 3 +#define TRBLIMITR_EL1_TM_IGNR 3 +#define TRBLIMITR_EL1_FM_FILL 0 #define TRBE_FILL_MODE_FILL 0 #define TRBE_FILL_MODE_WRAP 1 #define TRBE_FILL_MODE_CIRCULAR_BUFFER 3 @@ -121,7 +122,7 @@ static inline void set_trbe_write_pointer(unsigned long addr) static inline unsigned long get_trbe_limit_pointer(void) { u64 trblimitr = read_sysreg_s(SYS_TRBLIMITR_EL1); - unsigned long addr = trblimitr & (TRBLIMITR_LIMIT_MASK << TRBLIMITR_LIMIT_SHIFT); + unsigned long addr = trblimitr & TRBLIMITR_EL1_LIMIT_MASK; WARN_ON(!IS_ALIGNED(addr, PAGE_SIZE)); return addr; From patchwork Wed Jun 14 06:59:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 107756 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1054431vqr; Wed, 14 Jun 2023 00:18:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4l9zLJrsesKCqbKHLzOZA+5BDtylzAWXqEqrFYxHxoLPaH+p62xcy60KKi56Zs/Mbi64T6 X-Received: by 2002:a2e:980c:0:b0:2b3:49e0:964 with SMTP id a12-20020a2e980c000000b002b349e00964mr377779ljj.40.1686727118466; Wed, 14 Jun 2023 00:18:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686727118; cv=none; d=google.com; s=arc-20160816; b=U023g7L66u25/cjN+tzYYspOGmMoF3aD8BIRUlzv20mBWqB0FPK6j53KIIcWip+5z7 h3cmL6673P7yANyp/EFM7msugnvMIPB7r0GexuUHL28J4gidx3cFf2ug9HGxMDet3E5M dWjQMJnQm08qFI6fP3EYPM6WnMODnuvP3YhEEpjnF6ODfAMRFXVCqbmgi5uOXr2UZPxM EyKGzExliqXJWjifV9GUYtySbjt7D81cRoufHy+k5nNpg3QCtpOyzoim+oXsce6nQgBI 4O8QSWx5dgBcxSsWLVxQNCfbSPyKgph42wIrl4U9lh5zCRxsoFzt+TG7k1s7VTsi7Ju4 l94Q== 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=c8tuB4cHL0fZ9JgdKKa3Ty8vxlhryF/LDWYP7lX7IBo=; b=H8pHwS9TQ6hRGcCRADtDltknv9hlzBewO0p4uZPZmRsYoJySnmfJ3gE82bTckuOdXD aNQnGerBkPpSUWgcl+4hp8ca4PUvhUVfULrJDJev69JZxSxATphsRXfBJG9dqIXry2cv 2UCkmMJoeSaH50nQ3caTjJzuFsmOOgSgndRa+HbZLVDlL0ZUBeRnvh4wdOO0mvTkcngM zNNc9CNTHFP7og+S4Hc9h6QkfsKFuV27sHOuk3TSTvbhgSzYcaB2XOxnDheb7wDba9aL GksETM6Te+5bO7oOfn4aEfBvXLbG0n99QIYH4LkHk6BvvAmY8Zf7mkkGWO1V7Ej5yGgg ThHQ== 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 a22-20020aa7d916000000b005149135a97csi8749576edr.272.2023.06.14.00.18.12; Wed, 14 Jun 2023 00:18:38 -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 S242572AbjFNHAZ (ORCPT + 99 others); Wed, 14 Jun 2023 03:00:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238550AbjFNHAU (ORCPT ); Wed, 14 Jun 2023 03:00:20 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7A2AF198D for ; Wed, 14 Jun 2023 00:00:18 -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 BDF51152B; Wed, 14 Jun 2023 00:01:02 -0700 (PDT) Received: from a077893.arm.com (unknown [10.163.46.15]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id F374B3F663; Wed, 14 Jun 2023 00:00:13 -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 02/14] arm64/sysreg: Rename TRBPTR_EL1 fields per auto-gen tools format Date: Wed, 14 Jun 2023 12:29:37 +0530 Message-Id: <20230614065949.146187-3-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?1768661574923735919?= X-GMAIL-MSGID: =?utf-8?q?1768661574923735919?= This renames TRBPTR_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 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index 1be3a44b8289..b7a0d7d0f4d6 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -260,8 +260,8 @@ #define TRBLIMITR_EL1_FM_MASK GENMASK(2, 1) #define TRBLIMITR_EL1_FM_SHIFT 1 #define TRBLIMITR_EL1_E BIT(0) -#define TRBPTR_PTR_MASK GENMASK_ULL(63, 0) -#define TRBPTR_PTR_SHIFT 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 TRBSR_EC_MASK GENMASK(5, 0) 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); } From patchwork Wed Jun 14 06:59:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 107743 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1052403vqr; Wed, 14 Jun 2023 00:13:55 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5sSpWztQsDyUL1Ko5wEwpeUZaiOhEmFNZByNKOSmv2m4jaEQzWFwAyWQV25A/w8iAYii1G X-Received: by 2002:a17:907:948f:b0:982:4b35:c0b6 with SMTP id dm15-20020a170907948f00b009824b35c0b6mr728662ejc.1.1686726835193; Wed, 14 Jun 2023 00:13:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686726835; cv=none; d=google.com; s=arc-20160816; b=0Y7TWiix1/BOmrrbsvFCxmQaZnHccKpsYylji83LvbPFm9xJh2PKKa9NKAK3Xmxosf hO6z8wXbYIu2zqRWyctmlcsUecKFBakMnI0Fmj2Isx8CpdETN1lle0VBEywi+72oljs7 EW+gxcWHwtnAEl0FZohMF+K3SJ4Szdu8pcMy4dBJVX3ke8UaIgEDBWB7pr88RPhB38rV psUYM1tHbvwNq5/PANqSAhbAWfFBjRaGfX4169g/sfBBkBdyKb2moOqA7bb6r1QDzXlA id7hUh1Owbc7kykBxNpmOoKqxjq+iYb/Ps3HC0MhfEvNCex5s8uvJ0+tIAgrS7L/3EUR vvVQ== 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=QyIjg22/cyNqJVMjvni84fCv12EBfzaJTPWIuXjHa/A=; b=h0teG76Knnu+U0Wwd8M49O7MB++qx6zrCw7bRENJAnbCyKSMz9PfVPGL/J8igP79Dd au5tKaEyerx7AIJlNi26str4g2wCIvRYkflJduSzf2yyEZUwPGRm2EHLUzCFRs3J8rLG +qcP/UF+TG6LRZxj5kbQIF8iQTdWHeT1xurAAHUs79ZoDVGRXdHeSCsAkkXOqAFesUUu fGxl+QtqSf/neTk7KEIfqbnUPHA0KZumjAfvOhgQVerTM0ognBhE234T3LePUuGXHN/B /WNCyqAGE+Dx+rRqn8EbLsUOW8TRCDRXzyDOHxkibp9heW08WzhHXr8FuuYEcpOSbDrb gQUA== 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 re6-20020a170906d8c600b009745c46bea1si4109154ejb.670.2023.06.14.00.13.31; Wed, 14 Jun 2023 00:13:55 -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 S243184AbjFNHAr (ORCPT + 99 others); Wed, 14 Jun 2023 03:00:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242654AbjFNHAf (ORCPT ); Wed, 14 Jun 2023 03:00:35 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8D5AB1FDB for ; Wed, 14 Jun 2023 00:00:29 -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 A737D2F4; Wed, 14 Jun 2023 00:01:13 -0700 (PDT) Received: from a077893.arm.com (unknown [10.163.46.15]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id DFA1E3F663; Wed, 14 Jun 2023 00:00:24 -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 04/14] arm64/sysreg: Rename TRBSR_EL1 fields per auto-gen tools format Date: Wed, 14 Jun 2023 12:29:39 +0530 Message-Id: <20230614065949.146187-5-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?1768661277436157796?= X-GMAIL-MSGID: =?utf-8?q?1768661277436157796?= This renames TRBSR_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 | 26 ++++++++++---------- drivers/hwtracing/coresight/coresight-trbe.c | 12 ++++----- drivers/hwtracing/coresight/coresight-trbe.h | 16 ++++++------ 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index 896b9b6334b4..6ee331a52bb2 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -264,19 +264,19 @@ #define TRBPTR_EL1_PTR_SHIFT 0 #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) -#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 TRBSR_EL1_EC_MASK GENMASK(31, 26) +#define TRBSR_EL1_EC_SHIFT 26 +#define TRBSR_EL1_IRQ BIT(22) +#define TRBSR_EL1_TRG BIT(21) +#define TRBSR_EL1_WRAP BIT(20) +#define TRBSR_EL1_EA BIT(18) +#define TRBSR_EL1_S BIT(17) +#define TRBSR_EL1_MSS_MASK GENMASK(15, 0) +#define TRBSR_EL1_MSS_SHIFT 0 +#define TRBSR_EL1_BSC_MASK GENMASK(5, 0) +#define TRBSR_EL1_BSC_SHIFT 0 +#define TRBSR_EL1_FSC_MASK GENMASK(5, 0) +#define TRBSR_EL1_FSC_SHIFT 0 #define TRBMAR_SHARE_MASK GENMASK(1, 0) #define TRBMAR_SHARE_SHIFT 8 #define TRBMAR_OUTER_MASK GENMASK(3, 0) diff --git a/drivers/hwtracing/coresight/coresight-trbe.c b/drivers/hwtracing/coresight/coresight-trbe.c index 1d9d141c62e9..1bab91ce8e95 100644 --- a/drivers/hwtracing/coresight/coresight-trbe.c +++ b/drivers/hwtracing/coresight/coresight-trbe.c @@ -582,12 +582,12 @@ static void clr_trbe_status(void) u64 trbsr = read_sysreg_s(SYS_TRBSR_EL1); WARN_ON(is_trbe_enabled()); - trbsr &= ~TRBSR_IRQ; - trbsr &= ~TRBSR_TRG; - trbsr &= ~TRBSR_WRAP; - trbsr &= ~(TRBSR_EC_MASK << TRBSR_EC_SHIFT); - trbsr &= ~(TRBSR_BSC_MASK << TRBSR_BSC_SHIFT); - trbsr &= ~TRBSR_STOP; + trbsr &= ~TRBSR_EL1_IRQ; + trbsr &= ~TRBSR_EL1_TRG; + trbsr &= ~TRBSR_EL1_WRAP; + trbsr &= ~TRBSR_EL1_EC_MASK; + trbsr &= ~TRBSR_EL1_BSC_MASK; + trbsr &= ~TRBSR_EL1_S; write_sysreg_s(trbsr, SYS_TRBSR_EL1); } diff --git a/drivers/hwtracing/coresight/coresight-trbe.h b/drivers/hwtracing/coresight/coresight-trbe.h index 0b73d9d10aa8..3743d9085355 100644 --- a/drivers/hwtracing/coresight/coresight-trbe.h +++ b/drivers/hwtracing/coresight/coresight-trbe.h @@ -39,7 +39,7 @@ static inline bool is_trbe_enabled(void) static inline int get_trbe_ec(u64 trbsr) { - return (trbsr >> TRBSR_EC_SHIFT) & TRBSR_EC_MASK; + return (trbsr & TRBSR_EL1_EC_MASK) >> TRBSR_EL1_EC_SHIFT; } #define TRBE_BSC_NOT_STOPPED 0 @@ -48,40 +48,40 @@ static inline int get_trbe_ec(u64 trbsr) static inline int get_trbe_bsc(u64 trbsr) { - return (trbsr >> TRBSR_BSC_SHIFT) & TRBSR_BSC_MASK; + return (trbsr & TRBSR_EL1_BSC_MASK) >> TRBSR_EL1_BSC_SHIFT; } static inline void clr_trbe_irq(void) { u64 trbsr = read_sysreg_s(SYS_TRBSR_EL1); - trbsr &= ~TRBSR_IRQ; + trbsr &= ~TRBSR_EL1_IRQ; write_sysreg_s(trbsr, SYS_TRBSR_EL1); } static inline bool is_trbe_irq(u64 trbsr) { - return trbsr & TRBSR_IRQ; + return trbsr & TRBSR_EL1_IRQ; } static inline bool is_trbe_trg(u64 trbsr) { - return trbsr & TRBSR_TRG; + return trbsr & TRBSR_EL1_TRG; } static inline bool is_trbe_wrap(u64 trbsr) { - return trbsr & TRBSR_WRAP; + return trbsr & TRBSR_EL1_WRAP; } static inline bool is_trbe_abort(u64 trbsr) { - return trbsr & TRBSR_ABORT; + return trbsr & TRBSR_EL1_EA; } static inline bool is_trbe_running(u64 trbsr) { - return !(trbsr & TRBSR_STOP); + return !(trbsr & TRBSR_EL1_S); } #define TRBE_TRIG_MODE_STOP 0 From patchwork Wed Jun 14 06:59:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 107742 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1052389vqr; Wed, 14 Jun 2023 00:13:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ40K+VfOiD7pmNMwIAFgC5B+3jpcDj+toDA3xUA2ayd2LWfCJyoXpdwnVLd00547VLqz2oN X-Received: by 2002:a05:6402:6d0:b0:514:8eb7:d587 with SMTP id n16-20020a05640206d000b005148eb7d587mr6914053edy.17.1686726833399; Wed, 14 Jun 2023 00:13:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686726833; cv=none; d=google.com; s=arc-20160816; b=jUOtpjuU99vxHCohDjZ1NL45S5GW/egveUMPYXGecEJVwbpmOdMcIbOPiwk59OZ9m7 PFaHoHWXOSGyzvXQLlqRou/rtdZQSW5lRZuBCSR7r24aYv0VCn9/Aqrbr06TOCL88Vba 7fAnq38/4oy2TPivVypr58YU29UtthTIKOVC54MyhUdR+AWSiAoeXyReCMk4ANfvaxpg hNpe+bJ1vBuK1GfKCi2lCiAhw+bjnIWzvWTRBznhUYX7CGAyqiP/71IGD+ie2JrijGnz 7tFl2dJmSbn/69Ha/GS+wLvrd9X6rSI+28WZk6Rsun10hRMRjy/y2p6N8tvaqZBboawY M9pQ== 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=Hp7uE9mEissfU3AQtD+ZkH59GMIdMsQCQPqJrxajts0=; b=WNWwkU9Reu/XwUyFpTiogjCvQ4+2TxDPWRaZhPu492zzYgQOcic7EZ/A0p2fE1sw/Y QXqc45+DnjHLbAzJ0Cbnz62c1fhpwaY3bH6mjzNwsCsQctN1gZQYOdaISNJdjh7nyxIs n6GLAEOByeGSNJytQAdUSAJr+T24JeXGgIGuLPxd2efkMJr+9msWfoIN1Yde9B82RtVk HEqXRBfZzab3IF4MQS1pv4UkspyOFCXBCKb//+d98lkNzErx05UAEe78yka2GHUJs839 HBuUcKaPkEdQbDdqtbN562YZLNSnhANxoH//fLKJnkvCyJY+siwoA5/Q7f/FH2cMuogH gm0g== 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 e7-20020a50fb87000000b00514b897d26dsi2435287edq.358.2023.06.14.00.13.28; Wed, 14 Jun 2023 00:13:53 -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 S242891AbjFNHAy (ORCPT + 99 others); Wed, 14 Jun 2023 03:00:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238569AbjFNHAk (ORCPT ); Wed, 14 Jun 2023 03:00:40 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 367A81FE8 for ; Wed, 14 Jun 2023 00:00:34 -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 709781FB; Wed, 14 Jun 2023 00:01:18 -0700 (PDT) Received: from a077893.arm.com (unknown [10.163.46.15]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id CAEE23F663; Wed, 14 Jun 2023 00:00:29 -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 05/14] arm64/sysreg: Rename TRBMAR_EL1 fields per auto-gen tools format Date: Wed, 14 Jun 2023 12:29:40 +0530 Message-Id: <20230614065949.146187-6-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?1768661276257183781?= X-GMAIL-MSGID: =?utf-8?q?1768661276257183781?= This renames TRBMAR_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 | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index 6ee331a52bb2..8080c52d2fff 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -277,12 +277,10 @@ #define TRBSR_EL1_BSC_SHIFT 0 #define TRBSR_EL1_FSC_MASK GENMASK(5, 0) #define TRBSR_EL1_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 TRBMAR_EL1_SH_MASK GENMASK(9, 8) +#define TRBMAR_EL1_SH_SHIFT 8 +#define TRBMAR_EL1_Attr_MASK GENMASK(7, 0) +#define TRBMAR_EL1_Attr_SHIFT 0 #define TRBTRG_TRG_MASK GENMASK(31, 0) #define TRBTRG_TRG_SHIFT 0 #define TRBIDR_FLAG BIT(5) From patchwork Wed Jun 14 06:59: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: 107737 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1048354vqr; Wed, 14 Jun 2023 00:04:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5x77SRz18Jeg9KKrt1jBtyTlrVrl0/diHbxqORRPsds9bRc2gtkfEVpkYzkRQllUNMU7up X-Received: by 2002:a17:907:5c1:b0:96f:c46f:d8fe with SMTP id wg1-20020a17090705c100b0096fc46fd8femr15794890ejb.27.1686726271247; Wed, 14 Jun 2023 00:04:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686726271; cv=none; d=google.com; s=arc-20160816; b=z7+z84x6KxWq+xuvO9Lki0RTWcPQVGkSLJzUoE6TGC10lAq6ngjAtJSHThy0sZsPcZ 0PdLydk87ZxeIODno1lCNhF8BWL2vhXWHLEPgbFJuMAEkFKqwEv/hVlH9OYJvjcDZhNp ivPqCyFpawZLJHHXMBrw4ZTt7WQ7UtXW5JsrgDFkxvGBz+r6mV4/ZXqrGSh3xGEPMXKP 4MQPJYw4s6FZSnU+pUkvfSKY5lW94CgGk6UY/zosysxoosndSFagOunVpcfPwX24exPW i9b2N5m1E7H2Yx7rlzuiodgnJ8r9KzJ3723rpk2i3ZzN/NDWvLibRGwDnxTvQnclY2ap WJPw== 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=NgFewRWHFpxv3E2jflCcBc/XGsrEkteI0/9y1TjsQaw=; b=grSNXU9vk1Kxfm+TbjNWhm/RBdc7GjtjMvQR5r8ChcEVGYGW8nZ+mcc871oB90lmcd 2Fjaur0Tc0LPA2rngpiaI5BH26qKdi0cx7EagBlnr1wieV4k4Wm4PtT8GAdSsuaU0RVj q9zN8hlCQ1IemCqd/MFKvWkaeM1OvdoAOn9s1IEPtbFNlHFT/b/cDHUSGV6cNONinX1m +1JDwD2fhxdvrWHXoI+4pq26NLwN56WwLRF1gvdj99JzRXLdbCGyHElzu98nOHlPhT0e 36zPWEuimZhwnz8H/gpXwc18O3vXBH/qwYWQmksHPDgP+tUjWHwMYf1nCw3eSdpidFtJ frjg== 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 v17-20020a170906339100b00973aab0b96esi7537586eja.386.2023.06.14.00.04.06; Wed, 14 Jun 2023 00:04:31 -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 S243229AbjFNHBC (ORCPT + 99 others); Wed, 14 Jun 2023 03:01:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243191AbjFNHAr (ORCPT ); Wed, 14 Jun 2023 03:00:47 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ECC661BEF for ; Wed, 14 Jun 2023 00:00:38 -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 3D2642F4; Wed, 14 Jun 2023 00:01:23 -0700 (PDT) Received: from a077893.arm.com (unknown [10.163.46.15]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 8EDF93F663; Wed, 14 Jun 2023 00:00:34 -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 06/14] arm64/sysreg: Rename TRBTRG_EL1 fields per auto-gen tools format Date: Wed, 14 Jun 2023 12:29:41 +0530 Message-Id: <20230614065949.146187-7-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?1768660686631693680?= X-GMAIL-MSGID: =?utf-8?q?1768660686631693680?= This renames TRBTRG_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 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index 8080c52d2fff..4789d932d027 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -281,8 +281,8 @@ #define TRBMAR_EL1_SH_SHIFT 8 #define TRBMAR_EL1_Attr_MASK GENMASK(7, 0) #define TRBMAR_EL1_Attr_SHIFT 0 -#define TRBTRG_TRG_MASK GENMASK(31, 0) -#define TRBTRG_TRG_SHIFT 0 +#define TRBTRG_EL1_TRG_MASK GENMASK(31, 0) +#define TRBTRG_EL1_TRG_SHIFT 0 #define TRBIDR_FLAG BIT(5) #define TRBIDR_PROG BIT(4) #define TRBIDR_ALIGN_MASK GENMASK(3, 0) From patchwork Wed Jun 14 06:59:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 107747 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1053026vqr; Wed, 14 Jun 2023 00:15:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5n7EcoeIBUcY/wYMPB789vNjtTxAN5gbReBxPLqhQN9soVBe6gLsdjaOyrvBj65xxdcRUR X-Received: by 2002:a05:6402:35c6:b0:514:8eb1:1aaa with SMTP id z6-20020a05640235c600b005148eb11aaamr778797edc.11.1686726923642; Wed, 14 Jun 2023 00:15:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686726923; cv=none; d=google.com; s=arc-20160816; b=nf84+Mm37zX3c6n86ftQgJmHTMJAneP+uyLTO7hqV5dET/1Oc6Uu9NivnZEYnszhfF AHfIN2+vGLeKmTLTF7Y1X+bZicP8g2JpdhpuxyjLw0o+nzfJPS39yZkm9n0Ke9tc8Om/ PK0OrIf3TIoAeGI/KRVGN1Ozn456u1uaqV5w3P4aEhpAMmTVZc56jgLwu7rsgyu7IXGn G5wiFKuXsCPKvzS6nZukVyClnRyJ+8EBZYYoLagzt6BW2AHkTWfSiErQvN0AGwSmZNch 33v9D2QDXO6rwlH8LbMf7rJCbYUg2YaPEEIti/xdG83lguPvBK9rdThKrRrlh3VGbR0s YxSA== 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=mppCJu07x0tAWUlJzMCTZgZlVbqJDAzQ6lkpHZqpxjc=; b=gPjzdxhUdsk92m+y8JwxeYT6REqbuUic8nEcH4fogVMJbrY0xfzeI/vyrwj37DVP4e oltqD3aqbU+vg9/g3Vanx2JgkYnaF1/ojW9h4SdFPT0gtaQR+y9R3uptRE9zPZDeUcze mHUY1gNPq09s7IFZRHvijaM+QHjXLm2bl6TJ40DIzQmi4kUHD8Kx8y9MCTRMoWyzeuo7 NHZPjOShOnhwXWZF3xRk+QvcBBilQUSD0HQ+ittSavmgL0d5MUgXJcb6qQGMSoL2bAPQ WEr2JnPJ4KX3NXrVRI4yNQcqEtNDY9kltjkR6oPRNjiUbdvwWk+KxFgSO4MkQX9sh0ke tUVA== 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.14.58; Wed, 14 Jun 2023 00:15:23 -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 S243078AbjFNHBL (ORCPT + 99 others); Wed, 14 Jun 2023 03:01:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243252AbjFNHAt (ORCPT ); Wed, 14 Jun 2023 03:00:49 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AA6931FF7 for ; Wed, 14 Jun 2023 00:00:43 -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 E177A1FB; Wed, 14 Jun 2023 00:01:27 -0700 (PDT) Received: from a077893.arm.com (unknown [10.163.46.15]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 781D53F663; Wed, 14 Jun 2023 00:00:39 -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 07/14] arm64/sysreg: Rename TRBIDR_EL1 fields per auto-gen tools format Date: Wed, 14 Jun 2023 12:29:42 +0530 Message-Id: <20230614065949.146187-8-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?1768661370780295669?= X-GMAIL-MSGID: =?utf-8?q?1768661370780295669?= This renames TRBIDR_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/el2_setup.h | 2 +- arch/arm64/include/asm/sysreg.h | 8 ++++---- arch/arm64/kvm/debug.c | 2 +- drivers/hwtracing/coresight/coresight-trbe.h | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/arm64/include/asm/el2_setup.h b/arch/arm64/include/asm/el2_setup.h index 037724b19c5c..63ea1ef6c99e 100644 --- a/arch/arm64/include/asm/el2_setup.h +++ b/arch/arm64/include/asm/el2_setup.h @@ -69,7 +69,7 @@ cbz x0, .Lskip_trace_\@ // Skip if TraceBuffer is not present mrs_s x0, SYS_TRBIDR_EL1 - and x0, x0, TRBIDR_PROG + and x0, x0, TRBIDR_EL1_P cbnz x0, .Lskip_trace_\@ // If TRBE is available at EL2 mov x0, #(MDCR_EL2_E2TB_MASK << MDCR_EL2_E2TB_SHIFT) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index 4789d932d027..c505838d7851 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -283,10 +283,10 @@ #define TRBMAR_EL1_Attr_SHIFT 0 #define TRBTRG_EL1_TRG_MASK GENMASK(31, 0) #define TRBTRG_EL1_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 TRBIDR_EL1_F BIT(5) +#define TRBIDR_EL1_P BIT(4) +#define TRBIDR_EL1_Align_MASK GENMASK(3, 0) +#define TRBIDR_EL1_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) diff --git a/arch/arm64/kvm/debug.c b/arch/arm64/kvm/debug.c index 55f80fb93925..8725291cb00a 100644 --- a/arch/arm64/kvm/debug.c +++ b/arch/arm64/kvm/debug.c @@ -333,7 +333,7 @@ void kvm_arch_vcpu_load_debug_state_flags(struct kvm_vcpu *vcpu) /* Check if we have TRBE implemented and available at the host */ if (cpuid_feature_extract_unsigned_field(dfr0, ID_AA64DFR0_EL1_TraceBuffer_SHIFT) && - !(read_sysreg_s(SYS_TRBIDR_EL1) & TRBIDR_PROG)) + !(read_sysreg_s(SYS_TRBIDR_EL1) & TRBIDR_EL1_P)) vcpu_set_flag(vcpu, DEBUG_STATE_SAVE_TRBE); } diff --git a/drivers/hwtracing/coresight/coresight-trbe.h b/drivers/hwtracing/coresight/coresight-trbe.h index 3743d9085355..d661b062293f 100644 --- a/drivers/hwtracing/coresight/coresight-trbe.h +++ b/drivers/hwtracing/coresight/coresight-trbe.h @@ -95,17 +95,17 @@ static inline bool is_trbe_running(u64 trbsr) static inline bool get_trbe_flag_update(u64 trbidr) { - return trbidr & TRBIDR_FLAG; + return trbidr & TRBIDR_EL1_F; } static inline bool is_trbe_programmable(u64 trbidr) { - return !(trbidr & TRBIDR_PROG); + return !(trbidr & TRBIDR_EL1_P); } static inline int get_trbe_address_align(u64 trbidr) { - return (trbidr >> TRBIDR_ALIGN_SHIFT) & TRBIDR_ALIGN_MASK; + return (trbidr & TRBIDR_EL1_Align_MASK) >> TRBIDR_EL1_Align_SHIFT; } static inline unsigned long get_trbe_write_pointer(void) From patchwork Wed Jun 14 06:59:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 107746 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1053020vqr; Wed, 14 Jun 2023 00:15:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5rAe2b9cPv70qRVh9QjrpL22jmZ/0LKcXiBD2KDNE9Rlims3ZfIWbVuNCl2wE1yb+mwey4 X-Received: by 2002:a05:6402:14ce:b0:50b:c456:a72a with SMTP id f14-20020a05640214ce00b0050bc456a72amr659204edx.19.1686726922751; Wed, 14 Jun 2023 00:15:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686726922; cv=none; d=google.com; s=arc-20160816; b=r/CxMTkBC9rIo79mAZXazY2HIuqXuR1+xSX0Yk0WPcyiq3Vgz5wnaU+0kEMiLOmt6H mxCbJS18TUGP2jkJxCgjFe0dE4qzIkHJqaJgkwGz+csHcaGDXVtxwfLxZY7SUk02xvnq s7eR2ur2Ds0mVheD4y7dcVoBGpmcYfL7rsj0ThRxIK6LH7mpZhq+aKsGlHVRXadnGxPp pdkbpMgfu6LmRytSP8dc75YnlLMtj7FjxRFubaI1qqENXG46bt1x0Z5gYy4+6yzvKGIM zVm/XJAcbSlnhl5E5ozc+OOyMcLet7fcK2yB7xV7tnb1zdtjgfYS/sEwxLJOnf9GKrkU 5CCA== 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=kP8ko/dYkkYI55Wuy7juNi2wfXe2GMZ8sDeDnCA9Jk8=; b=E1htzwbaM16zeMlIOpyZpHkS+fyWoyeA9T8eOn8N5BgmiuJCg/5dAS0pqLN2nM0yjX BMOiCJu0bu5nqqtev9nDANvPRj65RdOdWkkVYrjhMDG5tSJXg0S+RoS4yfj3kO/0zV39 VT0DztHYT5Kv7B3t5vRUy88pnodXECLXWc0K+LEo5rk6+iAyEgpeJ661wtzuZC6Tgo0Y M1Tmz8gBhcCVdZX2aUaDbcFd4d58RjO52Es5lZFaJXdxPWhtDC6mLk5Ux5YR8jxczzui rgCn3/ozmeYIFkOTI/JZspzoDf1acpzVigDeensMxCcBiHO0FNLUvWCJHthVJ/J+g0Pi z2ug== 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 v5-20020aa7cd45000000b00519608f2e5asi83022edw.653.2023.06.14.00.14.58; Wed, 14 Jun 2023 00:15:22 -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 S243256AbjFNHBR (ORCPT + 99 others); Wed, 14 Jun 2023 03:01:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233906AbjFNHAy (ORCPT ); Wed, 14 Jun 2023 03:00:54 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 868E01FDC for ; Wed, 14 Jun 2023 00:00:48 -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 B9E142F4; Wed, 14 Jun 2023 00:01:32 -0700 (PDT) Received: from a077893.arm.com (unknown [10.163.46.15]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 3FED53F663; Wed, 14 Jun 2023 00:00:43 -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 08/14] arm64/sysreg: Convert TRBLIMITR_EL1 register to automatic generation Date: Wed, 14 Jun 2023 12:29:43 +0530 Message-Id: <20230614065949.146187-9-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?1768661369593048015?= X-GMAIL-MSGID: =?utf-8?q?1768661369593048015?= This converts TRBLIMITR_EL1 register to automatic generation without causing any functional change. Cc: Catalin Marinas Cc: Will Deacon Cc: Marc Zyngier Cc: Mark Brown Cc: Rob Herring Cc: Suzuki K Poulose Cc: James Morse Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Mark Brown Signed-off-by: Anshuman Khandual Reviewed-by: Mark Brown --- arch/arm64/include/asm/sysreg.h | 12 ------------ arch/arm64/tools/sysreg | 18 ++++++++++++++++++ drivers/hwtracing/coresight/coresight-trbe.h | 9 --------- 3 files changed, 18 insertions(+), 21 deletions(-) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index c505838d7851..7dc053150010 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -241,10 +241,6 @@ /*** 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) @@ -252,14 +248,6 @@ #define SYS_TRBTRG_EL1 sys_reg(3, 0, 9, 11, 6) #define SYS_TRBIDR_EL1 sys_reg(3, 0, 9, 11, 7) -#define TRBLIMITR_EL1_LIMIT_MASK GENMASK_ULL(63, 12) -#define TRBLIMITR_EL1_LIMIT_SHIFT 12 -#define TRBLIMITR_EL1_nVM BIT(5) -#define TRBLIMITR_EL1_TM_MASK GENMASK(4, 3) -#define TRBLIMITR_EL1_TM_SHIFT 3 -#define TRBLIMITR_EL1_FM_MASK GENMASK(2, 1) -#define TRBLIMITR_EL1_FM_SHIFT 1 -#define TRBLIMITR_EL1_E BIT(0) #define TRBPTR_EL1_PTR_MASK GENMASK_ULL(63, 0) #define TRBPTR_EL1_PTR_SHIFT 0 #define TRBBASER_EL1_BASE_MASK GENMASK_ULL(63, 12) diff --git a/arch/arm64/tools/sysreg b/arch/arm64/tools/sysreg index c9a0d1fa3209..a43309607d42 100644 --- a/arch/arm64/tools/sysreg +++ b/arch/arm64/tools/sysreg @@ -2200,3 +2200,21 @@ Sysreg ICC_NMIAR1_EL1 3 0 12 9 5 Res0 63:24 Field 23:0 INTID EndSysreg + +Sysreg TRBLIMITR_EL1 3 0 9 11 0 +Field 63:12 LIMIT +Res0 11:7 +Field 6 XE +Field 5 nVM +Enum 4:3 TM + 0b00 STOP + 0b01 IRQ + 0b11 IGNR +EndEnum +Enum 2:1 FM + 0b00 FILL + 0b01 WRAP + 0b11 CBUF +EndEnum +Field 0 E +EndSysreg diff --git a/drivers/hwtracing/coresight/coresight-trbe.h b/drivers/hwtracing/coresight/coresight-trbe.h index d661b062293f..77cbb5c63878 100644 --- a/drivers/hwtracing/coresight/coresight-trbe.h +++ b/drivers/hwtracing/coresight/coresight-trbe.h @@ -84,15 +84,6 @@ static inline bool is_trbe_running(u64 trbsr) return !(trbsr & TRBSR_EL1_S); } -#define TRBE_TRIG_MODE_STOP 0 -#define TRBE_TRIG_MODE_IRQ 1 -#define TRBLIMITR_EL1_TM_IGNR 3 - -#define TRBLIMITR_EL1_FM_FILL 0 -#define TRBE_FILL_MODE_FILL 0 -#define TRBE_FILL_MODE_WRAP 1 -#define TRBE_FILL_MODE_CIRCULAR_BUFFER 3 - static inline bool get_trbe_flag_update(u64 trbidr) { return trbidr & TRBIDR_EL1_F; From patchwork Wed Jun 14 06:59:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 107738 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1048407vqr; Wed, 14 Jun 2023 00:04:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ59Wh8AwNFldO/Wn0gDs/Cj6r3cMVYvo0cQROx08CZ1nx9tqL2mnlk+hRhmx2QPgp5LcZMI X-Received: by 2002:a17:903:2286:b0:1ac:9cad:1845 with SMTP id b6-20020a170903228600b001ac9cad1845mr12156204plh.18.1686726277706; Wed, 14 Jun 2023 00:04:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686726277; cv=none; d=google.com; s=arc-20160816; b=Yz9RyHGFenQVJi2HZzTrSLzQ+FyFDNd7vs9t/XvGjHTENfKXXBK+jyFTnyBKdBNTKg 0a3XZ7g1sFdk/VtnhqBRgI5L/hz3QWgbOh5o1/I42G1HgrZAzzX0RWHH9E33agNeVFVe NchNVDzBPG/ZGUu7zDAyE7uh8DYMNBYKUyu50bLA0AmyJoKdcDO6ePGFW/q5oq1em0BD WCVFW7f7glk9EoaFVtBCqUMEaoONA/Q9SetRAalPC/bwexkMuRa85awYOnPnUFwonO/I B081dHvIZVl0+2wE+raJemlVbECOCZY/X1OHPnFJBQpHy31siVAvU4MV5AlOJckheNru CSjw== 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=rRXPGBgFuEYv04D0/QdafWKZ90+TPNLAh3/rP59YZFw=; b=SK9U6q4nirIcJxW6PaZN38KzmkQK3pjFHpIxklgkH/Aw1KKDYiU7y+66h8OtN3QKPJ p1GrAAqwEcBqGDf6MM+KlmflKZSRQKNqO86qO16ZHJUG1fYxBCd0m7mbD7s16rybNgKr Pcv2IpmWl2hzFbNC+WzPHt2rGhG6M0sTr7QudEZlEaBOBcg9tVHjube5C2xldzNZJHtP 4dVOMGEMb8f35vNKIy0pBPSyTF4c6ncw3FVZ9r56Dm1JALo5+owGxI6puVhfiOTFA4Hv Cq2QsvA0m58LRpPsDf9Ov5LISaEBFh0Crf2riRtfQ4x/OK6tX/HjDSFBWQm08A6tLJ/A IepA== 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 o18-20020a170902d4d200b001b3de2e77b3si3573478plg.137.2023.06.14.00.04.24; Wed, 14 Jun 2023 00:04: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 S243235AbjFNHBb (ORCPT + 99 others); Wed, 14 Jun 2023 03:01:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238564AbjFNHBA (ORCPT ); Wed, 14 Jun 2023 03:01:00 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 19F101FD0 for ; Wed, 14 Jun 2023 00:00:52 -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 2B75F1FB; Wed, 14 Jun 2023 00:01:37 -0700 (PDT) Received: from a077893.arm.com (unknown [10.163.46.15]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D65983F663; Wed, 14 Jun 2023 00:00:48 -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 09/14] arm64/sysreg: Convert TRBPTR_EL1 register to automatic generation Date: Wed, 14 Jun 2023 12:29:44 +0530 Message-Id: <20230614065949.146187-10-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?1768660693461432067?= X-GMAIL-MSGID: =?utf-8?q?1768660693461432067?= This converts TRBPTR_EL1 register to automatic generation without causing any functional change. Cc: Catalin Marinas Cc: Will Deacon Cc: Marc Zyngier Cc: Mark Brown Cc: Rob Herring Cc: Suzuki K Poulose Cc: James Morse Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Mark Brown Signed-off-by: Anshuman Khandual Reviewed-by: Mark Brown --- arch/arm64/include/asm/sysreg.h | 3 --- arch/arm64/tools/sysreg | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index 7dc053150010..6f2a0bef1db8 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -241,15 +241,12 @@ /*** End of Statistical Profiling Extension ***/ -#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 TRBPTR_EL1_PTR_MASK GENMASK_ULL(63, 0) -#define TRBPTR_EL1_PTR_SHIFT 0 #define TRBBASER_EL1_BASE_MASK GENMASK_ULL(63, 12) #define TRBBASER_EL1_BASE_SHIFT 12 #define TRBSR_EL1_EC_MASK GENMASK(31, 26) diff --git a/arch/arm64/tools/sysreg b/arch/arm64/tools/sysreg index a43309607d42..ad6da3ea1cd5 100644 --- a/arch/arm64/tools/sysreg +++ b/arch/arm64/tools/sysreg @@ -2218,3 +2218,7 @@ Enum 2:1 FM EndEnum Field 0 E EndSysreg + +Sysreg TRBPTR_EL1 3 0 9 11 1 +Field 63:0 PTR +EndSysreg From patchwork Wed Jun 14 06:59:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 107753 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1054039vqr; Wed, 14 Jun 2023 00:17:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7oxqYLC8SfGdpTo0Yo/vKGzIpozNRvg+98EXGbfww/RG+mFulG28ZLSbEsoPFWxAysRFJM X-Received: by 2002:a17:902:8a8d:b0:1ac:451d:34a with SMTP id p13-20020a1709028a8d00b001ac451d034amr10191398plo.33.1686727063790; Wed, 14 Jun 2023 00:17:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686727063; cv=none; d=google.com; s=arc-20160816; b=gLzEL7sDS/Med5mNhfMnARh18ZM+g/qfF5ay6NV2OVTj94zQ4m99qT7n5pi0hAzgcu XlBeqyYvygEmdxZDU760eZu/hkzE16JEnCfoCB0XOCH3Vr66VLrgjF2aV2U4eRkrvcSa YlIDUr4k0qAnY6fF5JHGBWV8G/bC6u9TP4zHwAYDRurXGyQ9VfzVYQo06yi5ZecH3DGu j97BjmMksNy6poWQCxI7awql5GTtvHDNkAgpvMeeUI8+mtCUAteE+blBQPARTdiE1y+A xLhhr6XfOWLpF5pllTqPktJV6V/5t3QCuTUrdXP5YEl3npTSHKh1vhfJGK+UQmbxeNw/ BrJg== 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=qo7dcNLOTcG7wA7lWe2AGVjFxYhip7YR4ztXi7zcOy8=; b=iKyqCRUuOzTS0e1bgH+9ZFZH/TDaENWBTt23XXCkQjbthFnsf25c9dZvkg/EOyOIj/ uFv6xYPH15PVzsEW7TAjRZL9YnPqxMRAXxFQRTHXWB+jf7G52gbthQdztQ+bIY60K6u4 AjXpenmqt54vnptoYwcoUNbWYO8OOVE4Ue3jDEIqs1Og1YihkN7gOd/0fL3/MoCeFTwd iVdR7LReRpqt5xFUCyg9z3tXYYMr5EauNFFR5YFG7ZZ4FoVCEiV9na/ScFqypVEd3POU rkTuvg0r0ztKxvZ4Qo0Ru575FPM4lx8S5jawuYGjHcXs6tly0WT4+dlaBWxlYMxYxdq2 tG/w== 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 w13-20020a170902e88d00b001a95d336558si8352600plg.594.2023.06.14.00.17.31; Wed, 14 Jun 2023 00:17:43 -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 S234356AbjFNHBh (ORCPT + 99 others); Wed, 14 Jun 2023 03:01:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243282AbjFNHBJ (ORCPT ); Wed, 14 Jun 2023 03:01:09 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7E4E82130 for ; Wed, 14 Jun 2023 00:00:57 -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 C31232F4; Wed, 14 Jun 2023 00:01:41 -0700 (PDT) Received: from a077893.arm.com (unknown [10.163.46.15]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 2B05A3F663; Wed, 14 Jun 2023 00:00:52 -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 10/14] arm64/sysreg: Convert TRBBASER_EL1 register to automatic generation Date: Wed, 14 Jun 2023 12:29:45 +0530 Message-Id: <20230614065949.146187-11-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?1768661517777939018?= X-GMAIL-MSGID: =?utf-8?q?1768661517777939018?= This converts TRBBASER_EL1 register to automatic generation without causing any functional change. Cc: Catalin Marinas Cc: Will Deacon Cc: Marc Zyngier Cc: Mark Brown Cc: Rob Herring Cc: Suzuki K Poulose Cc: James Morse Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Mark Brown Signed-off-by: Anshuman Khandual Reviewed-by: Mark Brown --- arch/arm64/include/asm/sysreg.h | 3 --- arch/arm64/tools/sysreg | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index 6f2a0bef1db8..72765f0df4c5 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -241,14 +241,11 @@ /*** End of Statistical Profiling Extension ***/ -#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 TRBBASER_EL1_BASE_MASK GENMASK_ULL(63, 12) -#define TRBBASER_EL1_BASE_SHIFT 12 #define TRBSR_EL1_EC_MASK GENMASK(31, 26) #define TRBSR_EL1_EC_SHIFT 26 #define TRBSR_EL1_IRQ BIT(22) diff --git a/arch/arm64/tools/sysreg b/arch/arm64/tools/sysreg index ad6da3ea1cd5..c58731f69467 100644 --- a/arch/arm64/tools/sysreg +++ b/arch/arm64/tools/sysreg @@ -2222,3 +2222,8 @@ EndSysreg Sysreg TRBPTR_EL1 3 0 9 11 1 Field 63:0 PTR EndSysreg + +Sysreg TRBBASER_EL1 3 0 9 11 2 +Field 63:12 BASE +Res0 11:0 +EndSysreg From patchwork Wed Jun 14 06:59:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 107739 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1048705vqr; Wed, 14 Jun 2023 00:05:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5zKtBLjOUJWivprdShgl3i8Fyx3bMhWPfGtRi9LtoCH+QlvBbDroRiqLeEb1ne3tIpU2JS X-Received: by 2002:a17:907:1c05:b0:973:daa0:2f6 with SMTP id nc5-20020a1709071c0500b00973daa002f6mr15142341ejc.3.1686726316450; Wed, 14 Jun 2023 00:05:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686726316; cv=none; d=google.com; s=arc-20160816; b=dZhwI7vSSYlNMxBMZl2Y0IVLMfOfPkhDmH7go6LBFykMjeYuVYICielaEOCOz4E+hm uyOsmoYjZdAtf+hmN04n/LrAhNBmwDzOiUwSHd0DVQUa0QQ5BHNMEHNfXHn02BS/aC10 g0cdPuHuidvfE15jmkO8qd0JlBPR3FZ752r/mFp//dZN2vcyudoCa9yxaiv5x0MKTE1F gjESPO/lSDSUsCove5Mb6LTP8nIQxT1s9ZjDGwewKTH/bJTHiC56WNy4WwrXssiU+FYK +r438FjkPDBGeWTURMgldHuvP7oNpF5d0xcDdtVMjLKHgBO0RZOt5MHm2H0Uq7uVy+Z2 mbew== 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=IHmSTsRTbthrV11IwPRprtTz68L6R+ZdxdvydZSzVbk=; b=eaAAuwKB5/6lSiQ8wNXFBnGWChGyN0KaH/WBSSjH54QgfeIljoZLrYHOscKOVZULfB I2hQ69PiDBUJK+0EKgqSxbh8Fv21GaSL0bd1eJ55YMbzm3B2B04pGAmiT+9G0ePQKffU Dm31l4J44PjcoFclBF6M+NZxFXA7DghGq8xvKK39cRHH1js6bmZB4/f4GgCsOIy2dx1m qzvTefwoEjKGFhcAh1+hI6qVLus/w/g4Xf8bb729myy4jU21dJtFu0Ca9Zh4sydHEoXg XFKzDDEgNyTXsGSodjySwP45i5oBRxXWUt6U4qJeL5TAEdDeW0pZTBu4h7E4vsAt3hAv b9oA== 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 v17-20020a170906339100b00973aab0b96esi7536178eja.386.2023.06.14.00.04.52; Wed, 14 Jun 2023 00:05:16 -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 S243101AbjFNHBs (ORCPT + 99 others); Wed, 14 Jun 2023 03:01:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242654AbjFNHBL (ORCPT ); Wed, 14 Jun 2023 03:01:11 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2064C2683 for ; Wed, 14 Jun 2023 00:01:02 -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 3DE1E1FB; Wed, 14 Jun 2023 00:01:46 -0700 (PDT) Received: from a077893.arm.com (unknown [10.163.46.15]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D5B523F663; Wed, 14 Jun 2023 00:00:57 -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 11/14] arm64/sysreg: Convert TRBSR_EL1 register to automatic generation Date: Wed, 14 Jun 2023 12:29:46 +0530 Message-Id: <20230614065949.146187-12-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?1768660733915056214?= X-GMAIL-MSGID: =?utf-8?q?1768660733915056214?= This converts TRBSR_EL1 register to automatic generation without causing any functional change. Cc: Catalin Marinas Cc: Will Deacon Cc: Marc Zyngier Cc: Mark Brown Cc: Rob Herring Cc: Suzuki K Poulose Cc: James Morse Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Mark Brown Signed-off-by: Anshuman Khandual Reviewed-by: Mark Brown --- arch/arm64/include/asm/sysreg.h | 12 ------------ arch/arm64/tools/sysreg | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index 72765f0df4c5..0c144c276706 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -241,24 +241,12 @@ /*** End of Statistical Profiling Extension ***/ -#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 TRBSR_EL1_EC_MASK GENMASK(31, 26) -#define TRBSR_EL1_EC_SHIFT 26 -#define TRBSR_EL1_IRQ BIT(22) -#define TRBSR_EL1_TRG BIT(21) -#define TRBSR_EL1_WRAP BIT(20) -#define TRBSR_EL1_EA BIT(18) -#define TRBSR_EL1_S BIT(17) -#define TRBSR_EL1_MSS_MASK GENMASK(15, 0) -#define TRBSR_EL1_MSS_SHIFT 0 #define TRBSR_EL1_BSC_MASK GENMASK(5, 0) #define TRBSR_EL1_BSC_SHIFT 0 -#define TRBSR_EL1_FSC_MASK GENMASK(5, 0) -#define TRBSR_EL1_FSC_SHIFT 0 #define TRBMAR_EL1_SH_MASK GENMASK(9, 8) #define TRBMAR_EL1_SH_SHIFT 8 #define TRBMAR_EL1_Attr_MASK GENMASK(7, 0) diff --git a/arch/arm64/tools/sysreg b/arch/arm64/tools/sysreg index c58731f69467..6d12980f01c7 100644 --- a/arch/arm64/tools/sysreg +++ b/arch/arm64/tools/sysreg @@ -2227,3 +2227,19 @@ Sysreg TRBBASER_EL1 3 0 9 11 2 Field 63:12 BASE Res0 11:0 EndSysreg + +Sysreg TRBSR_EL1 3 0 9 11 3 +Res0 63:56 +Field 55:32 MSS2 +Field 31:26 EC +Res0 25:24 +Field 23 DAT +Field 22 IRQ +Field 21 TRG +Field 20 WRAP +Res0 19 +Field 18 EA +Field 17 S +Res0 16 +Field 15:0 MSS +EndSysreg From patchwork Wed Jun 14 06:59:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 107745 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1052868vqr; Wed, 14 Jun 2023 00:15:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6KfzxBFOHqJVm18hEmqncSKEfETlaiLJ3f/FvBU/UHUcxDbmF2a6Mq3VLhCWa/SBV1DWal X-Received: by 2002:a17:907:9342:b0:973:8198:bbfb with SMTP id bv2-20020a170907934200b009738198bbfbmr16789705ejc.31.1686726902857; Wed, 14 Jun 2023 00:15:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686726902; cv=none; d=google.com; s=arc-20160816; b=Whju1MADVzTaNT4kSPdjZ1jqYF8BYEjVfmkQFEdqaiH+Su5peq5OpO0y+dF7gEmkxs m3eKuBNcG7tQr6dHxUO0Iektt7xyExsZF4HVtQTfzW5WqhkXVDBFmXKiljN31juzuT9w auU3JGrtiphgHI18YY6OsiYNhjcEtz8eEUUWBrEkmzaYF0V7/bzQcY2aApgMdhmX4z+5 Ba2W/YDfMwVV4imanLEk2DpIxWpu9Pdq4bR6prqKK1Jukerb7cAaY16tvQ5gYCRO8ym9 h3BuTVPY0+EfD4+GnUalbTNgypFAzxKH/uxFDn24Nf2Nx5NbDgi0M4C9kKbvarmEvJPT SiQA== 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=sJgRhChvH7teq/SWsbW1+xZw/Ogyn6ITojHrd8TG3qQ=; b=LxiSBq2ivuva7XxqiT4F+FtYzzyRhOAOaSr87PYXLcb+pTMR9QCPnzEQkDAB5aPkG9 vP4x0lvPKfareFm/bARZhmCwFbh0Pji30itmhYz1BsZBfF5HbuFilzfiN9akDkzOR5NH +XNEojVXwn7WSU78vuTqDv/dhUFfmBxeQuJYww6VbKlTwL0wh5dN5GZwIA2XFiQQCOfX t14pOJQaSHxmIlJtzeyJYrzTIZ+ToLM+2hOh1DXLJ0/CO3xGnxnBMD9TwaIYS+lVWqEm QjMuL6CDEyyBbnodlN8OQADniMwvDTj7z23DTnovQwCiuKa5ef+zuidTfffDSWZgWafD k8KA== 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 u9-20020a170906c40900b00977c8b7adf9si7867219ejz.641.2023.06.14.00.14.38; Wed, 14 Jun 2023 00:15:02 -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 S242741AbjFNHCA (ORCPT + 99 others); Wed, 14 Jun 2023 03:02:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241378AbjFNHB3 (ORCPT ); Wed, 14 Jun 2023 03:01:29 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0414A26AF for ; Wed, 14 Jun 2023 00:01:07 -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 489932F4; Wed, 14 Jun 2023 00:01:51 -0700 (PDT) Received: from a077893.arm.com (unknown [10.163.46.15]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 474C33F663; Wed, 14 Jun 2023 00:01:02 -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 12/14] arm64/sysreg: Convert TRBMAR_EL1 register to automatic generation Date: Wed, 14 Jun 2023 12:29:47 +0530 Message-Id: <20230614065949.146187-13-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?1768661348882823115?= X-GMAIL-MSGID: =?utf-8?q?1768661348882823115?= This converts TRBMAR_EL1 register to automatic generation without causing any functional change. Cc: Catalin Marinas Cc: Will Deacon Cc: Marc Zyngier Cc: Mark Brown Cc: Rob Herring Cc: Suzuki K Poulose Cc: James Morse Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Mark Brown Signed-off-by: Anshuman Khandual Reviewed-by: Mark Brown --- arch/arm64/include/asm/sysreg.h | 5 ----- arch/arm64/tools/sysreg | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index 0c144c276706..1d87de37364a 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -241,16 +241,11 @@ /*** End of Statistical Profiling Extension ***/ -#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 TRBSR_EL1_BSC_MASK GENMASK(5, 0) #define TRBSR_EL1_BSC_SHIFT 0 -#define TRBMAR_EL1_SH_MASK GENMASK(9, 8) -#define TRBMAR_EL1_SH_SHIFT 8 -#define TRBMAR_EL1_Attr_MASK GENMASK(7, 0) -#define TRBMAR_EL1_Attr_SHIFT 0 #define TRBTRG_EL1_TRG_MASK GENMASK(31, 0) #define TRBTRG_EL1_TRG_SHIFT 0 #define TRBIDR_EL1_F BIT(5) diff --git a/arch/arm64/tools/sysreg b/arch/arm64/tools/sysreg index 6d12980f01c7..ef2cea2aa037 100644 --- a/arch/arm64/tools/sysreg +++ b/arch/arm64/tools/sysreg @@ -2243,3 +2243,19 @@ Field 17 S Res0 16 Field 15:0 MSS EndSysreg + +Sysreg TRBMAR_EL1 3 0 9 11 4 +Res0 63:12 +Enum 11:10 PAS + 0b00 SECURE + 0b01 NON_SECURE + 0b10 ROOT + 0b11 REALM +EndEnum +Enum 9:8 SH + 0b00 NON_SHAREABLE + 0b10 OUTER_SHAREABLE + 0b11 INNER_SHAREABLE +EndEnum +Field 7:0 Attr +EndSysreg From patchwork Wed Jun 14 06:59:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 107752 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1053936vqr; Wed, 14 Jun 2023 00:17:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Hn/+eJU8OO5oDi2Wz+ktjTA6qNymXJU99Ukrai1JqQdYTsfnkiKksB51ANrg8j2U+Zypg X-Received: by 2002:a17:902:db02:b0:1b1:d6e5:3dd4 with SMTP id m2-20020a170902db0200b001b1d6e53dd4mr13691068plx.48.1686727046511; Wed, 14 Jun 2023 00:17:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686727046; cv=none; d=google.com; s=arc-20160816; b=yu0UexJTPPXxiuRsLNzxmscy0L42vjCQkEuK1lN88S8o7Qn252mbDOw5jdtT6aUAj7 igENN39Ay8oEqLxVH3TWuUWPmz6K0rfNqDXE1WDAtX44bcjymLgXJpg0fZ1fd0VOs8MC K/BuZSlrh0fnchGV3TGapmIYGGvCkV/FIqgYB1/onpCf0D64AVyCkw4G6oJ0nykErqN9 eruVSjSW7EbZO1P3SLfpq9/GXQYEVeP+AdtB21P7xvUVlw87jo2zbuaxTMvczbsWic0t gRKM0GQcuRzTwA3vvgWp6EGZsrw5sEuZFr+5Dmm5Rvkt5o+9C0HXGB1DFbtVgZW1WpD5 sniw== 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=gt8d6A5Hng94bNCcbYmILmMD99cNTMFtn4v+0MoR+M0=; b=gkiuXRanFhM2kcTqNBA+NiSf8OuVogr4bcmCzzTe5trZKdrq9KD9GBOrIXcduRhjmx 6DNqevyneCDXHZfMv4F0WQHfJHs+RIPaMupfzyzoM1M3j2f0BNS4IwynRhZfui0fnbTv dEFItPRHw5P83XWI7eD5aL8i4pcl/DuY+jjj3JP/5jy+vvS1M08JxhrWfqWVPbW+lc9v nP7VbjYyjPCbBTyPw9BwQv+o5Sd2JXVQI4CcP3oXmYgCUj4QsXq+FCjM5FK5MkI4zPcJ XKJp4xfrU0VjtWob/BUJnFXMc3dzoNoFxSvz8SH2S4KKuOGupjExLD/bdMbH5lezufGn A9AA== 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 z8-20020a170903018800b001b1be1317a1si11418045plg.219.2023.06.14.00.17.12; Wed, 14 Jun 2023 00:17:26 -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 S242947AbjFNHCT (ORCPT + 99 others); Wed, 14 Jun 2023 03:02:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238564AbjFNHBf (ORCPT ); Wed, 14 Jun 2023 03:01:35 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 371531FDC for ; Wed, 14 Jun 2023 00:01:12 -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 028441FB; Wed, 14 Jun 2023 00:01:56 -0700 (PDT) Received: from a077893.arm.com (unknown [10.163.46.15]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 75AE43F663; Wed, 14 Jun 2023 00:01:07 -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 13/14] arm64/sysreg: Convert TRBTRG_EL1 register to automatic generation Date: Wed, 14 Jun 2023 12:29:48 +0530 Message-Id: <20230614065949.146187-14-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?1768661499330526715?= X-GMAIL-MSGID: =?utf-8?q?1768661499330526715?= This converts TRBTRG_EL1 register to automatic generation without causing any functional change. Cc: Catalin Marinas Cc: Will Deacon Cc: Marc Zyngier Cc: Mark Brown Cc: Rob Herring Cc: Suzuki K Poulose Cc: James Morse Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Mark Brown Signed-off-by: Anshuman Khandual Reviewed-by: Mark Brown --- arch/arm64/include/asm/sysreg.h | 3 --- arch/arm64/tools/sysreg | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index 1d87de37364a..088831b6cf6c 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -241,13 +241,10 @@ /*** End of Statistical Profiling Extension ***/ -#define SYS_TRBTRG_EL1 sys_reg(3, 0, 9, 11, 6) #define SYS_TRBIDR_EL1 sys_reg(3, 0, 9, 11, 7) #define TRBSR_EL1_BSC_MASK GENMASK(5, 0) #define TRBSR_EL1_BSC_SHIFT 0 -#define TRBTRG_EL1_TRG_MASK GENMASK(31, 0) -#define TRBTRG_EL1_TRG_SHIFT 0 #define TRBIDR_EL1_F BIT(5) #define TRBIDR_EL1_P BIT(4) #define TRBIDR_EL1_Align_MASK GENMASK(3, 0) diff --git a/arch/arm64/tools/sysreg b/arch/arm64/tools/sysreg index ef2cea2aa037..4292e6014d2e 100644 --- a/arch/arm64/tools/sysreg +++ b/arch/arm64/tools/sysreg @@ -2259,3 +2259,8 @@ Enum 9:8 SH EndEnum Field 7:0 Attr EndSysreg + +Sysreg TRBTRG_EL1 3 0 9 11 6 +Res0 63:32 +Field 31:0 TRG +EndSysreg From patchwork Wed Jun 14 06:59:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 107750 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1053607vqr; Wed, 14 Jun 2023 00:16:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5xtLCKBlG1cfC2I8kycIGfSDyzRPKTwJzCEldgLXKJ6LyJWzYMCo7S6JT0nf5mly9igC4i X-Received: by 2002:a17:906:6a02:b0:97e:38ab:b287 with SMTP id qw2-20020a1709066a0200b0097e38abb287mr11840254ejc.68.1686727000179; Wed, 14 Jun 2023 00:16:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686727000; cv=none; d=google.com; s=arc-20160816; b=AfhkCDhdsQh7Az0RQX8aa9dcq46fL/dSya33diUYHjxhaYfptTW7WTufpWebGAvY0K hmzB+lkwSMt7lsSebB2pHrZpVBHCMt7Hh90OfkqR9wxq8xElZVuL/s7OLczTSZItz0Oz 23si5kCncElPwk4rrFQwB8oxX/SCsv31nl9yQ9nq7MEssFS/kmnIy2e4LJMIKxeYSkF5 KtAgVmFE1RQMYODB4fb78ZAlaocVo4z2hK9L8oq3xyVRJYTqFA/icvhWpMEKa9gESYyo 7TkRsZJBR1LnTK21Bzj8QbyrJLkyiRqQFYiFbLcuLHM/B9Mun6NoH6iYpWwDQlKjcnDf az1g== 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=1YWjIdHpBTZmNSgfONc6Y5f8EHdHc+4we3CCy4Nduas=; b=XOu2qE4Ze4tg4PwPKTYV95WVOhXXPvE8mFWhdWcZYN2iRuBwJXq6VoGXJMCdUdxCLu nNE6HcovUw5xmyT4lNlwo8wy1ioLIGlj4nVIGVs3j0rPYqbBsUSb8SHns1URIRtIBIL7 ru9mCtlIixWr4e0CpgsMaU6OHYDoN/TZY222BmwG+c8HuRhiHo1ggGuRg1ooc10UEc9f FoBzWHAXveKobXwuq+1cTJMPbOzfkV+kVPVHko9GTK36so4Q5j8I95GQu7QKN8N7sO5x YeIkqpvE8rT02COCyVhqminL2dCfJu8MqF1+gm337Isa12uxJ35BI8/v69M2DrVMxaRV SDyQ== 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 lr27-20020a170906fb9b00b00978813d3ec2si7416102ejb.344.2023.06.14.00.16.15; Wed, 14 Jun 2023 00:16:40 -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 S243297AbjFNHCY (ORCPT + 99 others); Wed, 14 Jun 2023 03:02:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241009AbjFNHBt (ORCPT ); Wed, 14 Jun 2023 03:01:49 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4EF7026BF for ; Wed, 14 Jun 2023 00:01:16 -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 7CCC5152B; Wed, 14 Jun 2023 00:02:00 -0700 (PDT) Received: from a077893.arm.com (unknown [10.163.46.15]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 1E48E3F663; Wed, 14 Jun 2023 00:01:11 -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 14/14] arm64/sysreg: Convert TRBIDR_EL1 register to automatic generation Date: Wed, 14 Jun 2023 12:29:49 +0530 Message-Id: <20230614065949.146187-15-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?1768661450846970106?= X-GMAIL-MSGID: =?utf-8?q?1768661450846970106?= This converts TRBIDR_EL1 register to automatic generation without causing any functional change. Cc: Catalin Marinas Cc: Will Deacon Cc: Marc Zyngier Cc: Mark Brown Cc: Rob Herring Cc: Suzuki K Poulose Cc: James Morse Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Mark Brown Signed-off-by: Anshuman Khandual Reviewed-by: Mark Brown --- arch/arm64/include/asm/sysreg.h | 6 ------ arch/arm64/tools/sysreg | 13 +++++++++++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index 088831b6cf6c..1b71bbd8b4e0 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -241,14 +241,8 @@ /*** End of Statistical Profiling Extension ***/ -#define SYS_TRBIDR_EL1 sys_reg(3, 0, 9, 11, 7) - #define TRBSR_EL1_BSC_MASK GENMASK(5, 0) #define TRBSR_EL1_BSC_SHIFT 0 -#define TRBIDR_EL1_F BIT(5) -#define TRBIDR_EL1_P BIT(4) -#define TRBIDR_EL1_Align_MASK GENMASK(3, 0) -#define TRBIDR_EL1_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) diff --git a/arch/arm64/tools/sysreg b/arch/arm64/tools/sysreg index 4292e6014d2e..7f22faeaaba0 100644 --- a/arch/arm64/tools/sysreg +++ b/arch/arm64/tools/sysreg @@ -2264,3 +2264,16 @@ Sysreg TRBTRG_EL1 3 0 9 11 6 Res0 63:32 Field 31:0 TRG EndSysreg + +Sysreg TRBIDR_EL1 3 0 9 11 7 +Res0 63:12 +Enum 11:8 EA + 0b0000 NON_DESC + 0b0001 IGNORE + 0b0010 SERROR +EndEnum +Res0 7:6 +Field 5 F +Field 4 P +Field 3:0 Align +EndSysreg