Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp562204rwo; Tue, 1 Aug 2023 23:53:51 -0700 (PDT) X-Google-Smtp-Source: APBJJlFTQVpfHRp94eeZSirhLsXwheyhSepm6M/7ytggHJeNb/iH94IrMPRAQXXsIHgdcKLOgQWR X-Received: by 2002:a05:6512:4003:b0:4f8:7055:6f7e with SMTP id br3-20020a056512400300b004f870556f7emr2905107lfb.44.1690959231668; Tue, 01 Aug 2023 23:53:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690959231; cv=none; d=google.com; s=arc-20160816; b=DgaitZtFhRa2f+F56lFIbCdglkzX6ZlMiD9WcaVF+83Z2P8N4bxTiUrdPcHN53syU7 jDCKwa2r5Dgbr3nP4gQBLLW6ODIgZuFoNLKRY2lHN1sphnr0DUYCkW/MRa8kJCrsyHw+ XeYqfTScUG/9BxTQU3qj4Px39HVZbBKclG+4EVv04PJU/8/jdltZgL4nwEfqtmzI0Hrb 2nIOAJ5RLbdZZ1jBU0y3jlQwqTFGHyS1ooiQjch4JYKTF3Pdv619IMMuw9Vkpqo+J9IU ryzLbmvSupLeXx2NJXVXVn/MzAz5QvKQgHmr582G1VUGIf/ORM0QWEqjwqcu/kbPzYeJ DQVw== 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 :message-id:date:subject:cc:to:from; bh=zfNMnoPfd+b54qb7xYYj9qLsCnUXjg6eJj+NPWwQzOA=; fh=xKYfWbSR6Co4F6xMl8ptRkMLMhLiLMTrZRbh7qRnSoM=; b=Vy39KmTAdVUwBqrJr9PK73GyM4KuRsyz5tZVreNXBraaFdVAaDQEsOtfdhTDFxbdPA j4xkseNsEW/Q7mQeaYcxr7vYJNzEWtJtrbZrx7+g7KqeMiUbqqR5molSULwRdwaIs6PH Mq8Qgp0Asfadj7iA2VPzDM6oCmNVCLvVBJfUcCWQvSi3V8CQrN+17PgyYM+m4W9K1lYc dy4nSuo5oIoPUsl1zDndSIGJn0t3ERIGsAv6ewODnTgM196Cm/2fBDSZwaPfiW5cZbI9 fsRlBcJnNg5K8qhQi7E84C175iL16L4DSyXP9V4McsbD2ImDTcklnPX9DY+mVi3hsh9R Jyag== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g15-20020aa7c58f000000b00522bdc90c78si5299018edq.681.2023.08.01.23.53.26; Tue, 01 Aug 2023 23:53:51 -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 S231701AbjHBGhI (ORCPT + 99 others); Wed, 2 Aug 2023 02:37:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229607AbjHBGhG (ORCPT ); Wed, 2 Aug 2023 02:37:06 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 90C9F122 for ; Tue, 1 Aug 2023 23:37:05 -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 5CBAFD75; Tue, 1 Aug 2023 23:37:48 -0700 (PDT) Received: from a077893.arm.com (unknown [10.163.53.180]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 4B8FC3F6C4; Tue, 1 Aug 2023 23:37:02 -0700 (PDT) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org, suzuki.poulose@arm.com Cc: Anshuman Khandual , Mike Leach , James Clark , Leo Yan , coresight@lists.linaro.org, linux-kernel@vger.kernel.org Subject: [PATCH] coresight: trbe: Directly use ID_AA64DFR0_EL1_TraceBuffer_IMP Date: Wed, 2 Aug 2023 12:06:58 +0530 Message-Id: <20230802063658.1069813-1-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,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 is_trbe_available() checks for the TRBE support via extracting TraceBuffer field value from ID_AA64DFR0_EL1, and ensures that it is implemented. This replaces the open encoding '0b0001' with 'ID_AA64DFR0_EL1_TraceBuffer_IMP' which is now available via sysreg tools. Functional change is not intended. Cc: Suzuki K Poulose Cc: Mike Leach Cc: James Clark Cc: Leo Yan Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- drivers/hwtracing/coresight/coresight-trbe.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwtracing/coresight/coresight-trbe.h b/drivers/hwtracing/coresight/coresight-trbe.h index 94e67009848a..ebb9108d8e24 100644 --- a/drivers/hwtracing/coresight/coresight-trbe.h +++ b/drivers/hwtracing/coresight/coresight-trbe.h @@ -24,7 +24,7 @@ static inline bool is_trbe_available(void) unsigned int trbe = cpuid_feature_extract_unsigned_field(aa64dfr0, ID_AA64DFR0_EL1_TraceBuffer_SHIFT); - return trbe >= 0b0001; + return trbe >= ID_AA64DFR0_EL1_TraceBuffer_IMP; } static inline bool is_trbe_enabled(void) -- 2.25.1