Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2272586pxm; Fri, 4 Mar 2022 12:50:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJzGShHpLSRUDORq0I+J+HHA0DciPVSUlpsC/Iy6MhXY7STVlDBVXmjyIh8jBh3ejwE4LkNz X-Received: by 2002:a17:902:f686:b0:151:ca86:e1be with SMTP id l6-20020a170902f68600b00151ca86e1bemr276204plg.16.1646427012967; Fri, 04 Mar 2022 12:50:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646427012; cv=none; d=google.com; s=arc-20160816; b=LtW/aVchGB0j7peYS0LFSOPE9XBrnhDpRiKimla2Z7Is0fVyMKMe//mjt8gzJHQcta 2oExP1Cw2eyl8nkXJtnl48/fJTVhgKeFgZKTxdhCKc3cAaxcO6J4TbfikV2aIJyADuDe p2QPqLQI+VxkFjYGUgvxHC6OEVwmFu3jRdYxk4k8zO+Pa9M28gmrUD5q/JSKiutXFj8s oxILaUs5CGxUHA7janZeLguJUDh9GWHWFuFAVvZV2IuA/4Z0r+kPaUY4xRJFbxjUQII0 ABrVrRoxLhLuwsFjszgQOSRPmiwnkH6lqlN80xt/OoTEDHklcn9Nz2Gnu+lQRD1ncWcp gYzg== 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=owftM0vHp9tsuLvvLaERNUmBK5oMleHCJ8gqjviOerE=; b=RXbRCzl5WiymlydfhXRoJ9l1gqVlxr/WFXzZ1hFAh0YKsGl4GhVEabkCpb4SpigGXI ueJTWXjsV3qGlDiFBM0j5YNOKl1ApuDqB2RPvsTQU8d7hTZ75SWJDqkGk6OQyBYlusyq REWI0e2sOonVjs0qayb2fupyutekpDi8KiC9bcDQaSRktq7AgsVUJN8DJS0CjSRtcwH4 bNFpoqWRWugoH08xqbSdjgppoPRv1jGeOhPlZTKXf+290+YRdAvf+Lxsr7XP8KFnOQB8 zp75D72gDV3jGD5x7wZDIlVLLXp6gNWyJZR1esmrCX9NNnG5v+QyVXUxjQXH7VzHyD3I Hr9g== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id i4-20020a635404000000b0037598406a93si5504592pgb.274.2022.03.04.12.50.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Mar 2022 12:50:12 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 79B8F223BFC; Fri, 4 Mar 2022 11:44:29 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241091AbiCDRUp (ORCPT + 99 others); Fri, 4 Mar 2022 12:20:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241038AbiCDRUd (ORCPT ); Fri, 4 Mar 2022 12:20:33 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 646F7151D27 for ; Fri, 4 Mar 2022 09:19:43 -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 1F57A1424; Fri, 4 Mar 2022 09:19:43 -0800 (PST) Received: from e121896.arm.com (unknown [10.57.42.166]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 7CCAA3F73D; Fri, 4 Mar 2022 09:19:41 -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 08/15] coresight: etm4x: Cleanup TRCSTALLCTLR register accesses Date: Fri, 4 Mar 2022 17:19:05 +0000 Message-Id: <20220304171913.2292458-9-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. In sysreg.h fields are defined as the register name followed by the field name and then _MASK. This allows for grepping for fields by name rather than using magic numbers. Signed-off-by: James Clark --- drivers/hwtracing/coresight/coresight-etm4x-sysfs.c | 12 ++++++------ drivers/hwtracing/coresight/coresight-etm4x.h | 4 ++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c index 2d29e9daf515..cd24590ea38a 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c @@ -397,22 +397,22 @@ static ssize_t mode_store(struct device *dev, /* bit[8], Instruction stall bit */ if ((config->mode & ETM_MODE_ISTALL_EN) && (drvdata->stallctl == true)) - config->stall_ctrl |= BIT(8); + config->stall_ctrl |= TRCSTALLCTLR_ISTALL; else - config->stall_ctrl &= ~BIT(8); + config->stall_ctrl &= ~TRCSTALLCTLR_ISTALL; /* bit[10], Prioritize instruction trace bit */ if (config->mode & ETM_MODE_INSTPRIO) - config->stall_ctrl |= BIT(10); + config->stall_ctrl |= TRCSTALLCTLR_INSTPRIORITY; else - config->stall_ctrl &= ~BIT(10); + config->stall_ctrl &= ~TRCSTALLCTLR_INSTPRIORITY; /* bit[13], Trace overflow prevention bit */ if ((config->mode & ETM_MODE_NOOVERFLOW) && (drvdata->nooverflow == true)) - config->stall_ctrl |= BIT(13); + config->stall_ctrl |= TRCSTALLCTLR_NOOVERFLOW; else - config->stall_ctrl &= ~BIT(13); + config->stall_ctrl &= ~TRCSTALLCTLR_NOOVERFLOW; /* bit[9] Start/stop logic control bit */ if (config->mode & ETM_MODE_VIEWINST_STARTSTOP) diff --git a/drivers/hwtracing/coresight/coresight-etm4x.h b/drivers/hwtracing/coresight/coresight-etm4x.h index cbba46f14ada..36934056a5dc 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.h +++ b/drivers/hwtracing/coresight/coresight-etm4x.h @@ -196,6 +196,10 @@ #define TRCEVENTCTL1R_ATB BIT(11) #define TRCEVENTCTL1R_LPOVERRIDE BIT(12) +#define TRCSTALLCTLR_ISTALL BIT(8) +#define TRCSTALLCTLR_INSTPRIORITY BIT(10) +#define TRCSTALLCTLR_NOOVERFLOW BIT(13) + /* * System instructions to access ETM registers. * See ETMv4.4 spec ARM IHI0064F section 4.3.6 System instructions -- 2.28.0