From patchwork Mon Nov 5 22:26:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 150225 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3162538ljp; Mon, 5 Nov 2018 14:26:40 -0800 (PST) X-Google-Smtp-Source: AJdET5fkOw4S/tylrBV6Xg/OA8YhZEZIUSuA0b4aQyReI9GS7gW84C/2nrYYQQFWSrl1ppVqIHWZ X-Received: by 2002:a62:1049:: with SMTP id y70-v6mr16439883pfi.113.1541456800162; Mon, 05 Nov 2018 14:26:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541456800; cv=none; d=google.com; s=arc-20160816; b=iCjtDiK5L/TFQ3z1wsg+wG+PcdOPF7s8tUiQ9GaUDKugU7dgcfoaEevwgFRK5yP26L 2oZyGl6pO/DDSL1MDER6jEHW4zSPJp/uicmu1bJg8BluA5NVl2ASH6ApeuKdtR+LgIKa obNdHXaJqpPHgrvuMYvEFbrQY7Rh+3Cq+9cl7l5F0hBDnrjIejjI1ZvU84HUIj1XqZE1 MvfBkSka8tJKayirR736JKkB8bSmNfEJAKWzA6Y1a74bqBI4KL6ftueF6pHkwozMtNw3 LvBbdW1wKMy/ZrYxK9QAlBNeW3Ja5+08uYj3jJBYo7sXCV2JBi6mi1BBmr0w6OMlQ/VJ lUMw== 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=kbp0i0noSt5NS9yHP1ZXGvz/6q60ME6LEo2FEAmuylE=; b=mZurEY913SKmBRWFylLi+cuLz82/PSoKMKn0Ud1dosk5dLk7/hUoE9adOrOWXKEm7o dVAvtLSkCC58PTwlIgyQdceWLIy6SQbLwfMUdyCnGhFcwpAoNgBDAbRBWxaxW2GLXLq3 CQpxO6f3GR/sFZJzrbgBhEaJNSUrhrOcHNMc8OiSsiL5a4tg0jg2CbXPNCqoLS3wW8Zl mwBA8MqimdV1cR2CAN0TG+ujxMqV1PBULss8mAKhzn3J3FGZ86dRjXQ30XZJOk6pTC0t 8VVGU0dXmMfsIuAgKtdjOVI8RszJmzRoslpnaHtztr7ABU5HAg16/aEMF4/CN7P6f7t3 K+/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QsOtfgvS; 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 s35si10328540pgk.392.2018.11.05.14.26.39; Mon, 05 Nov 2018 14:26:40 -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=QsOtfgvS; 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 S2388209AbeKFHsc (ORCPT + 32 others); Tue, 6 Nov 2018 02:48:32 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:46792 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388177AbeKFHsb (ORCPT ); Tue, 6 Nov 2018 02:48:31 -0500 Received: by mail-pg1-f195.google.com with SMTP id w7so4849955pgp.13 for ; Mon, 05 Nov 2018 14:26:37 -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=kbp0i0noSt5NS9yHP1ZXGvz/6q60ME6LEo2FEAmuylE=; b=QsOtfgvS2Rsn5IcjKaOBwNBUMSEQ2nNCSl9poPHNXc53jPjaFfva3JOeUkoVXs3Ezt xNTccmekK6m24ej7sEm+pEsnVADixWtuIYkHwOnWRtYCJO1ZzNWo2tz4PiO8BuCTcI7c sktIFH352p1/Pk1hg9K9zwZy3UgvOFCC3gwmE= 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=kbp0i0noSt5NS9yHP1ZXGvz/6q60ME6LEo2FEAmuylE=; b=IVckuM3UgDFL2x5kdp1ARIINZEMu8HqCzN62wcpr628t4KUWr55SNq6jVL8b40s2U8 +CB5ThrvrlRTt+aHZ4R67YcOo0NoFxI6Y6ORa5sZvnLtfRxgMDOrJ+Rc0LWll/TWkXKd inn4huA4VrMKVDUzf+7BbKECBIKXjrw6WbWXZGaICLXv0IvqnbcYT1IQQ/v59r5O+aj4 HSG5R6BziCaH/ulcCfCeQKPmeciM2RWQl5Gmfp/2Uo8OEwvvQVosFwIE/cv/0AcYkZ7d 2JqpvOrIRpf3Mi7RB8aVOcetPkMglBiKFvmYmmjsKfb75eupt36/FDVNcRjqQVpCev4t 2Ecg== X-Gm-Message-State: AGRZ1gJEPTLWKZ477BkNMpTpXeWi4/HAbrMo3XiF35xXs2ljbe6h6GAN 2E1Ab27PiubbBDGZNTSwyRzakw== X-Received: by 2002:a63:7cf:: with SMTP id 198mr19262077pgh.129.1541456796798; Mon, 05 Nov 2018 14:26:36 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id q26-v6sm58669804pfi.165.2018.11.05.14.26.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 05 Nov 2018 14:26:35 -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 2/3] coresight: etf: Release CLAIM tag after disabling the HW Date: Mon, 5 Nov 2018 15:26:29 -0700 Message-Id: <1541456790-28282-3-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1541456790-28282-1-git-send-email-mathieu.poirier@linaro.org> References: <1541456790-28282-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 --- drivers/hwtracing/coresight/coresight-tmc-etf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 Reviewed-by: Suzuki K Poulose 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)