Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1624441imu; Tue, 6 Nov 2018 01:28:35 -0800 (PST) X-Google-Smtp-Source: AJdET5cWkQSjGgiziqz+e2vz7ez5RF9PxYrqjMIHkQlQkK1uIdcUNhywoJVPJoENY0UOLlplp8Kw X-Received: by 2002:a17:902:703:: with SMTP id 3-v6mr25709414pli.38.1541496515887; Tue, 06 Nov 2018 01:28:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541496515; cv=none; d=google.com; s=arc-20160816; b=mpesFA5f+bvAo1tyshCe2dq5r9SZUxkLkmp7Wwx+SV/XNkKMcSTbi6SK5UHQCoxJZD lPp2O3cI1OAD8w/wnPkdjCRE2Fo3Dr0Ya1DDru8JaPkNBhhnnuUuhEs9fGmardqxS8tm MMvo26o9qQvUHtOiFoFc3PyKxWz7Y7v/iF0ZZjK/YGxtghOJ+oyTb/rZaQaq6N9EvSbu GvGbT7cIFk1fyuJDjM4tRzKg/vz9vMS3Ll3AOiTp3hETzYGSdAaYX7Ey0i4FVo4DiRof xKK4BAGhXpPopVLlDRuyz34O6BiLUH0j0qf+fd9oh1S7QJfpyDtkHM7ezGTOKXyMJzo1 ndwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=ey0qi/kv4xI9js7FofXb9Nz+nFOv8uq+hlJhBcNjFkE=; b=I84mTWvdEe929S2NPutzsN21ZlZJn5O1DFMVQUGncN6jNuF/jsAY1DN8UCrV2scG0p H5EACjh/DB3M3Vgyp+VDxUfHMviT6NEVjlDxI4IvSbVHaTqkJIZO08X60D5Ya7fgtXkQ G9UVjxulSQwqIemO1qACZQbX3bdg7uowRiYbfKS8X8+cu3QINNRgYA9LTKA/v3A+bH8B pXjNT9Njiu+zXUilgt2scDSjvyRzzEZY6ddpZg+9cskqB0Tq3dEAR/6OzMAfR9888TOg fm08ePEUmxLEJXYFRCxx6FlhXlTMDzkFo7PZBABP+cNBuezHb9g8f6+Z4gK1SONb/QYs VLUQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j19-v6si45522814pfh.63.2018.11.06.01.28.20; Tue, 06 Nov 2018 01:28:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387407AbeKFSv7 (ORCPT + 99 others); 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