From patchwork Fri Nov 30 18:43:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 10707013 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C1E3E14BD for ; Fri, 30 Nov 2018 18:44:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B3391300C0 for ; Fri, 30 Nov 2018 18:44:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A7C4230180; Fri, 30 Nov 2018 18:44:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5482A300C0 for ; Fri, 30 Nov 2018 18:44:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=rpz1y5suuu/O6r2uanmLbZqf1Ic/wiy7lg84s4j7cBU=; b=f+pyC+FXQxe3K0s+woD3LeIXlz 3MCimKjZYkhtVglrXdfLJiACv8ZzbvTJ9vaal/NLUn+wSIJVmHbBYlbsh/xcHUOvMYNm2Zp2BBGfv wopPC89pUxorsXre2B36b/p0DRId1Ohvw0XLrbnYwA7GP+HUb7YLb1zm4cgC5ZdmYqpIhQGG71I6S p2tc07gFaqibxNml0ST1kybCpB2/8dYsB8RDGOGB9vjGNYRd4jWPgq6ebTppoFzUNPwUq9jsN8sge YPljPHR6wxxvsYQCJru9OZMbKPnWeNUpNUoH2vTKVB4NhKglW/1vJLEjZuwSG+aWYbO4OMox/0yw5 IUcOzjug==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gSnlm-0000kx-Bu; Fri, 30 Nov 2018 18:44:06 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gSnl4-00008g-H9 for linux-arm-kernel@lists.infradead.org; Fri, 30 Nov 2018 18:43:24 +0000 Received: by mail-pg1-x542.google.com with SMTP id y4so2848297pgc.12 for ; Fri, 30 Nov 2018 10:43:12 -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=C9iAkn/eQ81AquoFVcDRP4BXRSDPvwi5lVom0WpXgdndGwCZmQdUQsc0LJ39BK7HH0 kCT8HZiFlMoI5S4CO9wUbiQmU+YZDXl22GevrHwzuI5arIPYrQvWzJxP3iPajaMdBtt3 B7ETOxXhQlqkn/G+DbDeFP7LSMBZC/Fqh/uNw= 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=lq3jdIbyC9ZZwDNSXspueQ6PjkIzInKBRJSmlr7tOmEISEqlE5COzmi2V/QZEXpo3D yaxkeFWPxTHud0k8/P3X40hknZK+wJ8BIOH6Y94Q1ON2HiGj38crJ8vzfmhgI7H1yrZd /JAzV7v/eKkEQpLVTIAXdJTq5ENw+dzl75oWpi2gpUXG0BIhMI38DsRmme7ktt/+G1bn Fe6IPUy7hR4jobw/GhViVjzgbzfJI1hbOt45hxw02mVkn0YYONkjHNJ3pOvNZ67E//uL XDhkQK9ESt4D3SJj6DGSmljhxWQjJkOdACXPZMTHZqdECBJLEdVsoUmTKrI2J/blfxp6 bmkg== X-Gm-Message-State: AA+aEWZfxSYOYKBKKqXa+7hLLQdrIu6CFKa54cyWo2La5liHwJXgUnCV mBL0YO5usw7862KiYzBnP8bzaw== X-Google-Smtp-Source: AFSGD/UZy7zWwm4JsDtF8rlBsET0+PI69OZOzPIlytWx/XBEcg/oYw6hn5webSmFz8TovtjTTzOxzw== X-Received: by 2002:a62:1541:: with SMTP id 62mr6721900pfv.230.1543603391929; Fri, 30 Nov 2018 10:43:11 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id l184sm12743147pfc.112.2018.11.30.10.43.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Nov 2018 10:43:11 -0800 (PST) From: Mathieu Poirier To: gregkh@linuxfoundation.org Subject: [PATCH 3/6] coresight: etf: Release CLAIM tag after disabling the HW Date: Fri, 30 Nov 2018 11:43:04 -0700 Message-Id: <1543603387-32645-4-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543603387-32645-1-git-send-email-mathieu.poirier@linaro.org> References: <1543603387-32645-1-git-send-email-mathieu.poirier@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181130_104322_570861_46A9D361 X-CRM114-Status: GOOD ( 14.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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)