From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC4CFC32789 for ; Tue, 6 Nov 2018 09:27:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B032120862 for ; Tue, 6 Nov 2018 09:27:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B032120862 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387469AbeKFSv7 (ORCPT ); Tue, 6 Nov 2018 13:51:59 -0500 Received: from foss.arm.com ([217.140.101.70]:57514 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729160AbeKFSv7 (ORCPT ); Tue, 6 Nov 2018 13:51:59 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9B79780D; Tue, 6 Nov 2018 01:27:40 -0800 (PST) Received: from [10.1.196.93] (en101.cambridge.arm.com [10.1.196.93]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8B81D3F5BD; Tue, 6 Nov 2018 01:27:39 -0800 (PST) Subject: Re: [PATCH 2/3] coresight: etf: Release CLAIM tag after disabling the HW To: Mathieu Poirier , linux-arm-kernel@lists.infradead.org Cc: alexander.shishkin@linux.intel.com, leo.yan@linaro.org, coresight@lists.linaro.org, linux-kernel@vger.kernel.org References: <1541456790-28282-1-git-send-email-mathieu.poirier@linaro.org> <1541456790-28282-3-git-send-email-mathieu.poirier@linaro.org> From: Suzuki K Poulose Message-ID: Date: Tue, 6 Nov 2018 09:27:38 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <1541456790-28282-3-git-send-email-mathieu.poirier@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/11/2018 22:26, Mathieu Poirier wrote: > This patch rectifies the sequence of events in function > tmc_etb_disable_hw() by disabling the HW first and then releasing the > CLAIM tag. Otherwise we could be corrupting the configuration done by an > external agent that would have claimed the device after we have released > it. > > Signed-off-by: Mathieu Poirier > --- > drivers/hwtracing/coresight/coresight-tmc-etf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/hwtracing/coresight/coresight-tmc-etf.c b/drivers/hwtracing/coresight/coresight-tmc-etf.c > index 5864ac55e275..a5f053f2db2c 100644 > --- a/drivers/hwtracing/coresight/coresight-tmc-etf.c > +++ b/drivers/hwtracing/coresight/coresight-tmc-etf.c > @@ -86,8 +86,8 @@ static void __tmc_etb_disable_hw(struct tmc_drvdata *drvdata) > > static void tmc_etb_disable_hw(struct tmc_drvdata *drvdata) > { > - coresight_disclaim_device(drvdata->base); > __tmc_etb_disable_hw(drvdata); > + coresight_disclaim_device(drvdata->base); > } > Well spotted. Reviewed-by: Suzuki K Poulose