Received: by 2002:a05:6512:3d0e:0:0:0:0 with SMTP id d14csp7837lfv; Tue, 12 Apr 2022 15:04:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPyxhhqA18W4NvaDJpduUQlqwphmcOJ4QBYVkputwrUtwuw68YxuUB9YTNaIMsPO2eOTCY X-Received: by 2002:a17:902:d48b:b0:158:558d:c58a with SMTP id c11-20020a170902d48b00b00158558dc58amr14028899plg.105.1649801079631; Tue, 12 Apr 2022 15:04:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649801079; cv=none; d=google.com; s=arc-20160816; b=Tw8/usdAOaqmnacshqJZbr6ZMY8Yooz+JlVvc9R8HeGq0rjgAJd0438wVFfsygH/nh M2AR7A0r2NmdGpNs/zR0IIIYAP8/WiHWlVInpOktHoUNSfaiWqopPywhmVZbj7E+d4Oe I2Y6UzhB6tk0jDilNieHFl4I1wDs3LoabWPdxBpn8484drVkV0lU513jcd6PU59j/N2+ HBC1ipRHTf2L3efg8dAkjnNXP4yC1MxSpxmVM56sGoCNGcW1EFXikF7hFOQmMB6R+fW/ Yxd7bhcP6Nr1ib17ZHEpcGiallJCDZMcIIWAWfHJ0uZzVH4Z4HgZWcoiHL2cqNzy5cJd A2eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=t1lzjwxfRXe1DwU9VxJjnLzAF8CyRAgCWO3N0tVaS6A=; b=vKq9Nzt82ES9AruxDO6yqxXgdklc/nyWgAh8r5IQzq3RRiIfJDf7q4pJPdZe6+4Vy9 KO8BNtq5VMJxLnHu5g9fiYTZOhZyVtsHxLNi1LcJWr2tAMmg1skdU+KTu9dUOJAsh54u 7iX1xKCkQv3eWSze6JsRZ27EbY7SkzF1k++p7XDH9IUVWHGw7FHjjkzxBPY3GdIuLzM3 0LzlSy2K1Opb3TA7jDn/YJYPEVgdPt+f5reFxeRW7uTUKV5Hhj7Z5saxwfB4Ykk4ILEO 7dUn7CekhFFEpD8foMdDgBLq4McDj3LAX4cE3LjBtiRwFczaD3ptphjklS5p/rIGVKgX I6sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f01vyjAE; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id h137-20020a62838f000000b004fa63c4434fsi12780840pfe.322.2022.04.12.15.04.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 15:04:39 -0700 (PDT) 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; dkim=pass header.i=@linaro.org header.s=google header.b=f01vyjAE; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5660816047E; Tue, 12 Apr 2022 13:55:57 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237200AbiDLK0H (ORCPT + 99 others); Tue, 12 Apr 2022 06:26:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379254AbiDLKTi (ORCPT ); Tue, 12 Apr 2022 06:19:38 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8128220E4 for ; Tue, 12 Apr 2022 02:18:30 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id m14so2370727wrb.6 for ; Tue, 12 Apr 2022 02:18:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=t1lzjwxfRXe1DwU9VxJjnLzAF8CyRAgCWO3N0tVaS6A=; b=f01vyjAEjFoGUrkbgP2UXQGBY1xVxDhe0SiX9aofWD9JMxHLgQk63dG1EqGaWLpYv+ UzFRqPYlI69MMAP6HRWmAqnO3RWWmHVrd8TjspfasQaP/WBMuyG2wpcrm3IGN6/DgUoV 8N9x5l8Nz3gyMLUcSxxZ52Z394Od1YSmPAtSDX+4evi4ZNIdRIz1TqAMoUYBRJw7OGw4 Lpri9tle00M6lwOn1g0zLhElnDIUExObh2NYjkw85BvbXWliFSOZ3Taas/l4HczG5LCX R2NAX3FE9vhKR9VeYBXr/RVJc6fSBVj5N0t5Kp6+EXGr06njt6IX4KtfcxPcAa1TI1UI oRmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=t1lzjwxfRXe1DwU9VxJjnLzAF8CyRAgCWO3N0tVaS6A=; b=sIKw4W//QSyYvyz0AQbeUdPOBEF9RS/2ZxdPqAwjabVftwBmHXDU1JWQImYdUHQhyg rOmWl5BvIZHav9nLnGgOYeNzrmNISI0WMrpp60gypjexhnc6Moyt6McM/Bum77M/DPrG 8OF6KdGcYs5fNFjw4ahSEOK2HQoUv21M/zS4MaEmL+FVXprz9ON8Nx60+qhxe2EAZLbb 0hshnIsvnkaEdPFqH7U6QqV7TN7Fb0LYbGo2GTE9H8QBNx6yCNkANm7tQOANy0Mj5JJa 2IRvu4SDU5MrcYcajqGIrS+PYxlSI2jrJrX6WioTmuI2q6BwU40luQbA+KuoSJKPlmtM aMug== X-Gm-Message-State: AOAM532v3CNdps0IYD4HxFaKc0u0LzvfQnsmd4dBanS/N3pB3jhE1UY2 RjRdn7OXVpKnfBGTHiT1NG7pfD6MWP/UsR9qsFMXqg== X-Received: by 2002:adf:cd87:0:b0:207:b0ad:6d8 with SMTP id q7-20020adfcd87000000b00207b0ad06d8mr1062384wrj.111.1649755109255; Tue, 12 Apr 2022 02:18:29 -0700 (PDT) MIME-Version: 1.0 References: <20220304171913.2292458-1-james.clark@arm.com> <20220304171913.2292458-9-james.clark@arm.com> In-Reply-To: <20220304171913.2292458-9-james.clark@arm.com> From: Mike Leach Date: Tue, 12 Apr 2022 10:18:18 +0100 Message-ID: Subject: Re: [PATCH v3 08/15] coresight: etm4x: Cleanup TRCSTALLCTLR register accesses To: James Clark Cc: suzuki.poulose@arm.com, coresight@lists.linaro.org, Anshuman.Khandual@arm.com, mathieu.poirier@linaro.org, leo.yan@linaro.com, Leo Yan , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 On Fri, 4 Mar 2022 at 17:19, James Clark wrote: > > 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 > Reviewed-by: Mike Leach -- Mike Leach Principal Engineer, ARM Ltd. Manchester Design Centre. UK