From patchwork Tue Nov 19 05:19:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 179706 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp171390ilf; Mon, 18 Nov 2019 21:52:55 -0800 (PST) X-Google-Smtp-Source: APXvYqwZmpr775HMqFtiMFhy/de4KjDPx5WsRsfzw4mStJnfB3ECtYzMOVudW0U7Jy7ETIcXKCZ1 X-Received: by 2002:a17:906:d210:: with SMTP id w16mr32545999ejz.86.1574142775436; Mon, 18 Nov 2019 21:52:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574142775; cv=none; d=google.com; s=arc-20160816; b=vUehGCuRMoKvcVgKdE1WZzzoEYGH012tzjo9DElWXdhd4P1LR2gz8c8VxGXJqWu3BV QLtyjXE408cTXMFZiTfYrH7WDL4f9aHt5n6CQli2XZ/LGc4C11B3h81R1yqFyawTm/Ym HK4R0xVBM+/a63Kkdnz/gUc556lhA0ZqzSHIOSgutpl/wo1bGvgu3/24g6LiEF1ezrTO qBofwihu03Yh94TZN5awrpHzTa2Nq0IUT+4TEYp7Rlfb9DnYpHjoza4yDDtAw6JzJlDe 7zajrBb0Joi06s3TddYpmD6z7wHSI0k1YOqQLY74HBCx5RGx896EK1Mi5VhpeMjQLLkk Y6tg== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=876XxU+Jjcpp5gf/rJMXREzt7qE/PfPPxNU94GuCpR0=; b=mHx0BzkpVjks+G6Q0Ui+kjYMqIqc340BvpiH9yooW1kLmOKMKRzJnDwHIFSrqIZXot 2WeNsmfQPjW671m5F/H05KecIuf3jy8Gc5HIOS3vDVSvqKTBu333riSXHrT1pok0FTBN SsK4I6BYrxY5ktw1coSlkIbwi0p4nMEKPOUCDt3Hek2fE5FUaqG5desEWX+Cl8w+TxAx R47KnlKN6Gkfx0po2e0Bl1U2eGTFTjMB/ri7hssKOMsrpkBOkuVLzGJV/JsyHmcv5YUQ nJm0r3DvAoabVf1zH/ElC36ookuMNfVnvxHipxYcJaOAwUQDQpg+RnaVqEOop2Zh7x5E R4TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0hPq5tpG; 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 f2si13403345ejd.369.2019.11.18.21.52.55; Mon, 18 Nov 2019 21:52:55 -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=@kernel.org header.s=default header.b=0hPq5tpG; 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 S1731958AbfKSFww (ORCPT + 26 others); Tue, 19 Nov 2019 00:52:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:50598 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731290AbfKSFws (ORCPT ); Tue, 19 Nov 2019 00:52:48 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5D03520721; Tue, 19 Nov 2019 05:52:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574142767; bh=v1U9l228jWqtWhwzn9ffmWZreUwxYYHeC5kYUpJ+idU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0hPq5tpGOZGW5uE30QL0tIlLcOMFeqLIrireI/abJX1d3znQMOtlkJjkv0dP9gtWg U2nMmDPgz592zY7aKAX0vIRQwAULTvS/YMnpExZXRZm6hzZuGqtamj5sMR5drvVYiy K/cPhWvdeiROKIOOoHAg1QuPeqMnDXge1TlqicYs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mathieu Poirier , Suzuki K Poulose , Sasha Levin Subject: [PATCH 4.14 193/239] coresight: perf: Disable trace path upon source error Date: Tue, 19 Nov 2019 06:19:53 +0100 Message-Id: <20191119051335.791779034@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191119051255.850204959@linuxfoundation.org> References: <20191119051255.850204959@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Suzuki K Poulose [ Upstream commit 4f8ef21007531c3d7cb5b826e7b2c8999b65ecae ] We enable the trace path, before activating the source. If we fail to enable the source, we must disable the path to make sure it is available for another session. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/hwtracing/coresight/coresight-etm-perf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.20.1 diff --git a/drivers/hwtracing/coresight/coresight-etm-perf.c b/drivers/hwtracing/coresight/coresight-etm-perf.c index 99cbf5d5d1c1f..69349b93e8741 100644 --- a/drivers/hwtracing/coresight/coresight-etm-perf.c +++ b/drivers/hwtracing/coresight/coresight-etm-perf.c @@ -317,11 +317,13 @@ static void etm_event_start(struct perf_event *event, int flags) /* Finally enable the tracer */ if (source_ops(csdev)->enable(csdev, event, CS_MODE_PERF)) - goto fail_end_stop; + goto fail_disable_path; out: return; +fail_disable_path: + coresight_disable_path(path); fail_end_stop: perf_aux_output_flag(handle, PERF_AUX_FLAG_TRUNCATED); perf_aux_output_end(handle, 0);