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: 152580 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3989768ljp; Fri, 30 Nov 2018 10:43:15 -0800 (PST) X-Google-Smtp-Source: AFSGD/WAY/FU0yQDbBxv7+qIV/JuDM8zX6N2hpOB6UzhpADC+2BtB39yzucx2BZgNNgJxMNXi67k X-Received: by 2002:a63:9d05:: with SMTP id i5mr5300203pgd.98.1543603395497; Fri, 30 Nov 2018 10:43:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543603395; cv=none; d=google.com; s=arc-20160816; b=dAlmCU2rNwm4dph7VweGC1SuMyv86jWm7RPuhXBbHg4aQgEe0BVPXcTSOTNs+YDoFD mZSVY3IPyE+YyBYc6AubQUAnwSOIcUQdacHZ2R08FiembnukfHgRiigWepa7rHgQF9h3 B0LdKKNhUfVdPcoGK+2HxH1UW7oXz0EJVmFdXG6Q4+iXY0/k6UApM3j25CWkThnqQzSW sT19EaXqYdcRkBkEe+YEDrydBYpy8fizCMDOzqlIQ34QKKn/c2PomDn/KZqEB5dyPSVO QbkB5YMzqxUBUrQnYi/sHSzm4sJ9jsugei0z/Iq/ww/x9Zg2wn2mUWA2rxW5O23Nn3ea q8ag== 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=X+LPfB9t8ZppvIHkViW4gWNgsSdbFPLAkByzPP7j9Ie4fQxhif2SQdodcDORX1tl3l HtBdjyS8asHpMOpThA2WKBivOvmccHImR/jeiroEbCyp/SqQypMRP9pNglHhvuEvUBJC OAdu6bJcI9o+z/sQkm0C2to6TCMbCf1RjSWsIB1igDTmh8+zyvpunK0Kp8W+xIsxoxnd ADy/xGcq2ffLjZAs0QClfGS80EANUiyIx/LjtzeClMF4hZED1FmDx0Lo1ntOQTpbwRbI Ndi2vr89csc+472ZyZOJPA/VZiPp2lBX62dwYdOJIynIpDqZ2zeyvNYcROURnJUNQP7W hRUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="C9iAkn/e"; 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 28si7547336pfm.50.2018.11.30.10.43.15; Fri, 30 Nov 2018 10:43:15 -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="C9iAkn/e"; 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 S1726831AbeLAFxY (ORCPT + 32 others); Sat, 1 Dec 2018 00:53:24 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:42289 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725817AbeLAFxX (ORCPT ); Sat, 1 Dec 2018 00:53:23 -0500 Received: by mail-pg1-f193.google.com with SMTP id d72so2859848pga.9 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=b/2sIEzY6iBWO411LIZJw+7iKR150WRbkVkf1P+b+KcfofhArui0FasDH+AqnVwgnN YCPqnYs9VBz3X4I55/+Fpisn3sU1bmBgNngJGzXqZkO6j59ZbkJwT63Kfoyx/vOq8MpP eFCGu2bTX75j9JDDq8gHWDT4lY6Esth40NRckkZMlGiEN0cC0tAK2deJkfmRn9FLWvIv OniSdk1TxC/esx3MjMrhgXC5+G3abHalgCjuf78tbX0wVy0JnUrodt4Hh5pSIkvKTJlD XPaSeztqSOKTrnDs2IHXh6NTh4FHy66v1ulSZGc1yQpc9XQbA/wllRE3E39VtZpZH3+V L5XQ== X-Gm-Message-State: AA+aEWay07siDFjv5z4e1bdZuAMsWclVrk/LZZR+umIwVgrf2mI48CxJ qz/tUlcHCyZTVPKlfNbuF94YYw== 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.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> 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)