From patchwork Wed Nov 7 23:08:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 150461 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp123757ljp; Wed, 7 Nov 2018 15:09:01 -0800 (PST) X-Google-Smtp-Source: AJdET5fKnMoBGMVrmAWNyTN6cNFn5xd0Byuqz0pGv4uLBZUmfeAiEj20Zc4+4zc1pE+ooZQuPY4y X-Received: by 2002:a63:7f0e:: with SMTP id a14-v6mr1890725pgd.296.1541632141605; Wed, 07 Nov 2018 15:09:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541632141; cv=none; d=google.com; s=arc-20160816; b=VjtedXMNhfpsr+EtAmY+bKrxVBnxjFE9P9T5MWDSx8TzQXXAOO2pAGrLTtbIF83G8L Oi5ykR7E2Sm8FAGtFqoajZJVbMpP33glWo67dwknDsyfiNS/q3C/pFdlh4wwTnzunjUp ZW3ZdQSKPuezVOi2DF69DYIFnOYtuzSrb4uBqMp52+j6UahVo8fxbnZ3S7oU7csFRK6n un3qRCLamNCXif0bT3jIpOHJZ3NEeo/wU4DP9PVQdY4QapUWb9xr+/4PVj+1BlT7MEmQ gPNpB1l/W/nTH0zhBmug5THqUFOPyd6IeTpQIRLgwp5ds53+yD3kqoyHJ/O6YrWg1D6y 6P+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=a54bpJWkTONWX4xBh3sap+Bcri1qS8QIiPLNgbLvU28=; b=e/rDU30REmqfBBBvaFSUAWHMbIqxxQzPdeFDG5AfuuxxRPD3xnze+QC80oj1u7VVBi qh2QBq5ETpn1PPbWp33MTCAyZiKKRWtCyhkMrkI+LuzIKp9ozNXxfyJ/nkcIsOks0bjY mqO78iViqhOFUQhkuhi7ejrzpzRUugdP2/1BwCJiM0VHyyvpe9vrpiiM7XMeUpkEq/Q5 B+/pGtWvmc+Ln+snrxQAOEMQKA0uLBAVDdd6JDAR4GmrhJ5rQCDxvn3WqSKu3J1Rams3 kvbdwPryclDtf/bb8BFxQfBM4wTmhfSEEpCLnnP5wSW1Js/BQqjV0CBUuMLOryUQ8F7q s6cQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="AwZL/D5d"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o24-v6si1667790pgv.242.2018.11.07.15.09.01; Wed, 07 Nov 2018 15:09:01 -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; dkim=pass header.i=@linaro.org header.s=google header.b="AwZL/D5d"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728344AbeKHIld (ORCPT + 32 others); Thu, 8 Nov 2018 03:41:33 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:35976 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727374AbeKHIld (ORCPT ); Thu, 8 Nov 2018 03:41:33 -0500 Received: by mail-pf1-f194.google.com with SMTP id d13-v6so1201320pfo.3 for ; Wed, 07 Nov 2018 15:08:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=a54bpJWkTONWX4xBh3sap+Bcri1qS8QIiPLNgbLvU28=; b=AwZL/D5dLy8phDigaMDGifD0erJIZ1zZs17j10a1S2Wl9x2zrDCMOxv9zAtFQhLSIV bk6jqEYxmJY7WT8BWaw/e51xYAo9YqgAlauZFLAPZdLTqieu3i4LXT1XxRZNBEqSeMkb EqSbDShuUBvk9T8TybIQXX2uDXWRvzyiks4dk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=a54bpJWkTONWX4xBh3sap+Bcri1qS8QIiPLNgbLvU28=; b=CfBXqKfXqhHilK8Q1RNPX0JJfOuCYCAv3oudkQTXZltvbQxNf4+iNvMUUWt6QXjH2O hUQveuJoeSmCaS+vjRCibR/v9k/H1X9A+LV+vGgkEN09pVcSN7Eo9kWwTJzc7b+8K1SA NMqnoxpFFRPZ1mM2N5QjQEEj1kqtu3oNc0vcSHW0zyEE7bzDuG3naqkioIGtNN2M10ir 0VRBNjqkrj70X4mgN+U+n9LtHvl+PoJHhdNnPoAPSvYfxIwsWRMXBpTi/tGOYWrNonwB MNuMSvsGD/LNx7+adec2urNMk1NiSAcndJbzQcdWWFq8/pMgsISfP1ptAumUsBwbZ0Fq v/cg== X-Gm-Message-State: AGRZ1gLG989sTsS7AGauCd6rgzm7GCt2e8drsOXBVBcrhOrF5jZH7hpr 2XSWQSF4iXHbYRSYR4/REhBnig== X-Received: by 2002:a62:8208:: with SMTP id w8-v6mr2219657pfd.150.1541632137587; Wed, 07 Nov 2018 15:08:57 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id e70-v6sm1802034pfb.113.2018.11.07.15.08.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Nov 2018 15:08:56 -0800 (PST) From: Mathieu Poirier To: linux-arm-kernel@lists.infradead.org Cc: alexander.shishkin@linux.intel.com, leo.yan@linaro.org, suzuki.poulose@arm.com, coresight@lists.linaro.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/4] coresight: etf: Release CLAIM tag after disabling the HW Date: Wed, 7 Nov 2018 16:08:50 -0700 Message-Id: <1541632132-1252-3-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1541632132-1252-1-git-send-email-mathieu.poirier@linaro.org> References: <1541632132-1252-1-git-send-email-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Reviewed-by: Suzuki K Poulose --- drivers/hwtracing/coresight/coresight-tmc-etf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 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); } static void __tmc_etf_enable_hw(struct tmc_drvdata *drvdata)