Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp64472pxb; Mon, 2 Nov 2020 14:08:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJy9jTJ9FGgWUS0x+Voy0CiVlP2PJUoqPirZxf0mpg1VPBl0Ym9y6DDZH0QOajQeU31nf59a X-Received: by 2002:aa7:d988:: with SMTP id u8mr19167102eds.64.1604354927863; Mon, 02 Nov 2020 14:08:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604354927; cv=none; d=google.com; s=arc-20160816; b=JOmp+HkatbQ9vuAB6r8fMgA65tZUosBx81lxVAokQCT3uTS2AV7HUNdv71LkO1VvW2 DUdVNMH8SNG/SURF84ZepkHwWrcLzBirmzj3XpkBPLBgNyNhTlpiRohM1nhYzUosSG6Y MtNuGfNQnxcpvb3pfWvfglcp7L2JITZDQ2WMRXtAdMfIcovjJQGdDjWrnFB5ar8BeJfX n7sUFcZonqHHRHeMiojUrRiQqUI9GE6FkxlMhEpcgPPzz6EQ8WeRu3+dPr5YlrxJZQlL ysi59ZpQs8Sg1I2cHE0cO0H23YmsMpK6NpZ/Uv942KbxU0pJeihttQ2eVIwO3EQWL2Vc T7Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=XppDCcDyhzMWgim+ITwt2LaLpH2qZkfc5K3fSQLXvk8=; b=bL3oKIspsmgwjnm/uPVF6tbqt8TC6vLS1wf29FMjCut0x1EB1rRC3UX81CoqEr8Wy3 FKO6S71VuygsNa6r2JCqIILqDfOQ4pazdbE099wPdjXrkODX8WEFthGI9eZsqH5iXpcV gV0ZeH35Y+8YlP5LFvaKL9/ISe/UZVM7UST8kMbpAZgNxlEwaSfJEqXApuqqUIPFOOvw rI1b0QjdBPKOtj7X5XBvyIihE2dg5oh2Xgq2XVVpecQY8VKOcPUl0v+mgIY9O3wFiJ4f zJNEjPsaWQQ/jbN6ATUZvSQ1xx4+XLn4Grf4WLCyMDXgRO3bdDX/KsaTV3jTX+RYqDrU oziw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d6si7652780edo.498.2020.11.02.14.08.24; Mon, 02 Nov 2020 14:08:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725833AbgKBWEW (ORCPT + 99 others); Mon, 2 Nov 2020 17:04:22 -0500 Received: from foss.arm.com ([217.140.110.172]:38388 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725777AbgKBWEV (ORCPT ); Mon, 2 Nov 2020 17:04:21 -0500 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 3C74B11FB; Mon, 2 Nov 2020 14:04:20 -0800 (PST) Received: from [10.57.20.162] (unknown [10.57.20.162]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 916113F719; Mon, 2 Nov 2020 14:04:18 -0800 (PST) Subject: Re: [PATCH v3 06/26] coresight: etm4x: Handle access to TRCSSPCICRn To: Mathieu Poirier Cc: linux-arm-kernel@lists.infradead.org, mike.leach@linaro.org, coresight@lists.linaro.org, linux-kernel@vger.kernel.org References: <20201028220945.3826358-1-suzuki.poulose@arm.com> <20201028220945.3826358-8-suzuki.poulose@arm.com> <20201102214633.GD2749502@xps15> From: Suzuki K Poulose Message-ID: <69e31875-10e5-2cd1-dd2d-0b63b1427c65@arm.com> Date: Mon, 2 Nov 2020 22:04:16 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20201102214633.GD2749502@xps15> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/2/20 9:46 PM, Mathieu Poirier wrote: > Hi Suzuki, > > On Wed, Oct 28, 2020 at 10:09:25PM +0000, Suzuki K Poulose wrote: >> TRCSSPCICR is present only if all of the following are true: >> TRCIDR4.NUMSSCC > n. >> TRCIDR4.NUMPC > 0b0000 . >> TRCSSCSR.PC == 0b1 >> >> Signed-off-by: Suzuki K Poulose >> --- >> drivers/hwtracing/coresight/coresight-etm4x-core.c | 13 ++++++++----- >> 1 file changed, 8 insertions(+), 5 deletions(-) >> >> diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c >> index d78a37b6592c..0310eac9dc16 100644 >> --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c >> +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c >> @@ -175,8 +175,9 @@ static int etm4_enable_hw(struct etmv4_drvdata *drvdata) >> drvdata->base + TRCSSCCRn(i)); >> writel_relaxed(config->ss_status[i], >> drvdata->base + TRCSSCSRn(i)); >> - writel_relaxed(config->ss_pe_cmp[i], >> - drvdata->base + TRCSSPCICRn(i)); >> + if (drvdata->nr_pe) > > Aren't you missing to check the value of the PC bit in TRCSSCSRn? > > /* > * TRCSSCSRn:PC, bit[3]: Indidate support for single-shot PE > * comparator input. > */ > if (drvdata->nr_pe && (config->ss_status[i] & BIT(3))) > > You're right. Thank for catching this. I will update the series and drop the patches 1-5. > I have picked up patches 1 to 5 and added a "Cc:stable" to paches 2, 4 and 5. > More comments to come tomorrow. Thanks ! Suzuki