Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2211934pxm; Fri, 4 Mar 2022 11:29:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJyeb+BUxsrcnRVJZhcNEOUK91dj1/slJaZO1LQJvpb6MwaLQt6uT4JVeU/AsilGxssskKoz X-Received: by 2002:a17:902:cccc:b0:14e:e89c:c669 with SMTP id z12-20020a170902cccc00b0014ee89cc669mr43231200ple.58.1646422158742; Fri, 04 Mar 2022 11:29:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646422158; cv=none; d=google.com; s=arc-20160816; b=Wv88eUwuaRPGZMfkDXmVYe/ZkXZUHjZSRFRpm6r8MA0H7mzcc7pgDGqLIssM4wYD7W rGiUxG1jsAuDPrGwGYdiVfYwmB+5vC8Izo0XmiV0EKUNP4K51bsWLhayEhE1S1MpHJTE 8tBM5cq6prOWsjNKtc52Z1WfkAC631YbdFg3yL2OAmwF5qMpr9bSzdRZNlHiWrrWCSBL OAvv+/oE0h501noinWNA12xRhANYZwoShacZqNoGV70qOE/MIOG61PGHlOvU84nvXPFS cYgXj5Hyp41h7m8z1ioX+qtsKzWYCAij/nbweEvbGgXXPZSEVTJQ7f5NZnySP3gtW6om h3aw== 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=eT+Cve3m1E8GzBcJQV2s3SU5G+8IZZXLeYpE601ojKk=; b=vDAObagA4z+It06OWtaj9tCdTi9T5DXDRKekGNrTxaP6CQ7X9PuzqDi50zXpi9dxPd mb4N9G8KlTBV40eNVRc16hTEGQWapy25Gi+5ZbMWeB92ccSbrOSmtxFOtKlHJWR17G1c DLITvPk2fdUrgvvCkn4EF4Kq0ECW1TucAf2HHLh8e84Cu0aoUjSz4UGX0dZE0kt4zd6T aDS8rgvj1CUVDNn2qLqfsYf+KjHgfa6gCivc7Ruw0lH4gK4Pxs814GBOGHUnlWoEbFJn tayvANliE/lJ0+PoTTRH8Ec99qa+kkNHonmVxzxjUS0cGV1dGoMLnK4Tb/r5sQeew5bW xRVw== 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:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id l24-20020a63da58000000b0037053f8a204si5368303pgj.293.2022.03.04.11.29.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Mar 2022 11:29:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 152F32129B1; Fri, 4 Mar 2022 11:12:03 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241141AbiCDRUz (ORCPT + 99 others); Fri, 4 Mar 2022 12:20:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241069AbiCDRUm (ORCPT ); Fri, 4 Mar 2022 12:20:42 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EEEF31662D5 for ; Fri, 4 Mar 2022 09:19:48 -0800 (PST) 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 730C21424; Fri, 4 Mar 2022 09:19:48 -0800 (PST) Received: from e121896.arm.com (unknown [10.57.42.166]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D07253F73D; Fri, 4 Mar 2022 09:19:46 -0800 (PST) From: James Clark To: suzuki.poulose@arm.com, coresight@lists.linaro.org, mike.leach@linaro.org, anshuman.khandual@arm.com Cc: mathieu.poirier@linaro.org, leo.yan@linaro.com, James Clark , Leo Yan , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 10/15] coresight: etm3x: Cleanup ETMTECR1 register accesses Date: Fri, 4 Mar 2022 17:19:07 +0000 Message-Id: <20220304171913.2292458-11-james.clark@arm.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20220304171913.2292458-1-james.clark@arm.com> References: <20220304171913.2292458-1-james.clark@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 This is a no-op change for style and consistency and has no effect on the binary output by the compiler. These fields already have macros to define them so use them instead of magic numbers. Signed-off-by: James Clark --- drivers/hwtracing/coresight/coresight-etm3x-core.c | 2 +- drivers/hwtracing/coresight/coresight-etm3x-sysfs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-etm3x-core.c b/drivers/hwtracing/coresight/coresight-etm3x-core.c index 7d413ba8b823..d0ab9933472b 100644 --- a/drivers/hwtracing/coresight/coresight-etm3x-core.c +++ b/drivers/hwtracing/coresight/coresight-etm3x-core.c @@ -204,7 +204,7 @@ void etm_set_default(struct etm_config *config) * set all bits in register 0x007, the ETMTECR2, to 0 * set register 0x008, the ETMTEEVR, to 0x6F (TRUE). */ - config->enable_ctrl1 = BIT(24); + config->enable_ctrl1 = ETMTECR1_INC_EXC; config->enable_ctrl2 = 0x0; config->enable_event = ETM_HARD_WIRE_RES_A; diff --git a/drivers/hwtracing/coresight/coresight-etm3x-sysfs.c b/drivers/hwtracing/coresight/coresight-etm3x-sysfs.c index e8c7649f123e..68fcbf4ce7a8 100644 --- a/drivers/hwtracing/coresight/coresight-etm3x-sysfs.c +++ b/drivers/hwtracing/coresight/coresight-etm3x-sysfs.c @@ -474,7 +474,7 @@ static ssize_t addr_start_store(struct device *dev, config->addr_val[idx] = val; config->addr_type[idx] = ETM_ADDR_TYPE_START; config->startstop_ctrl |= (1 << idx); - config->enable_ctrl1 |= BIT(25); + config->enable_ctrl1 |= ETMTECR1_START_STOP; spin_unlock(&drvdata->spinlock); return size; -- 2.28.0