Message ID | 1537471099-19781-18-git-send-email-mathieu.poirier@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp2376303ljw; Thu, 20 Sep 2018 12:18:51 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaLusK2VPLZs/I3oZJ9XOQCCIkJaWhLLlD4YHg9qbnJURanfICjHiaxlLvf+kEmSAkBAWO0 X-Received: by 2002:a17:902:76c1:: with SMTP id j1-v6mr5002685plt.278.1537471131717; Thu, 20 Sep 2018 12:18:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537471131; cv=none; d=google.com; s=arc-20160816; b=dgrhDnG/syNcWdfa1kcpjCHQR4r792ysY1BYvvTvHhAo/ldpDDdW67U1AqKjdzZfkb fNMZ0kGA4sQeRDWj2i4ncXfY/LUT5TGzFTqj0q4bd6IgfcNu0F3JYKzOkvt+tvqXH66a DE08B+/zYVa8gqPs7vhedyozKwWhK/2EoibCsK/DHfoOgQeCn1gsdnrfvjpHe7RXt/O2 DUQUXVYPO8wrWJPyucIyjg8nQ7ev+ynF7tSNK3ofQj3QDzYey/G2lFpbU7olu745szvQ WikPM7v8WlRORx4dYVosVjtcuCkh02cPGpS9DRbteI1LfsjxqMTdKjDQ2EwCUcOSeBXB X5cA== 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=ObPs8TBqb1FBhZucHBxXAUazksYFj4fmD4SKmUP8+rA=; b=lfgAdY8r+M5OeosbvfORpeU3a7TYueTrusYmFq51L01az5ZktNB0HtlD83ZAXzBAWg wwLoRYXx0OyqcC6ErSYNx2qG3ovWTIxXYzVBQlVuQMg+RjKqY1yhoCxxTB215AlfxreU JOruANbRuj43yNO6v5dcswdnFERnH9iTRj174E9vo/j2h/b0r/xdpvqDXggNPG2g9HpJ AelOq4llVhLwRvca81tGBAC3iHnrhUM6rzBYGW5Dy7CgqFHhnX+Dxa2UngZ0u+O7lVig CiYt27EkPB+rP/TKIYIrEzMLMA3jGhM5kxNomDNqsxzXdTrR8yK0EP3kwz5U11B1VSfX wnIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fsBEayu8; 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: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w16-v6si25963959pga.104.2018.09.20.12.18.51; Thu, 20 Sep 2018 12:18:51 -0700 (PDT) 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=fsBEayu8; 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 S2388860AbeIUBDr (ORCPT <rfc822;igor.opaniuk@linaro.org> + 32 others); Thu, 20 Sep 2018 21:03:47 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:40188 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388833AbeIUBDq (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 20 Sep 2018 21:03:46 -0400 Received: by mail-pl1-f194.google.com with SMTP id s17-v6so4791174plp.7 for <linux-kernel@vger.kernel.org>; Thu, 20 Sep 2018 12:18:48 -0700 (PDT) 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=ObPs8TBqb1FBhZucHBxXAUazksYFj4fmD4SKmUP8+rA=; b=fsBEayu8vtj+dBnKQsFWsbQLIRoK1CjTRzt94gokqPrNLPyADX1BXthDgarHA/Vf9x wGxJG6c3pgoO0Mk4Iuk14x55Q+m/3A4suWuP/C7b6pMRE3wG37jJgf9CKFbMv8W5B6T3 hMu8cemFTIWPIT63RnAIs6oWVsZSDDta9jwyU= 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=ObPs8TBqb1FBhZucHBxXAUazksYFj4fmD4SKmUP8+rA=; b=oRsEik8yLRDUWlQPC0e61eKrPHSZtylxxN23vgGfA2atbb7SyOE0bbdBuQpSjUCMWH yQ0hiQa/nmYO1OnRbf3uOV/P+SszmNhck0lbrRiuLga/BEfiUX21qPX1KSUpfzjCzCSp iHE5ZnP8rxs616Z4FcMSWLvGe2mznnCHED+OPfhRyub9Bj+ltLTYkhTOKNww1yBEYUSY dQiB73r7jxuMZc/YCbf2vcGQfLLtc70Zd76TZpFttf+ISB1V5Y1UseVx1pADGLC1PQLN ZcdaYqj0pzryG6qbOzC7GjFS1gpNZl0th76lkCRiNQoKQLVNqENVTxSZtrlT/OSKl65c MMnA== X-Gm-Message-State: APzg51B1RTpbiqvZq1Drobv17EcUoLwRbumVlYDzjXzUSjPUvR6pGSY7 AhpCO87o0Mejmge9FdVjCsrOKiCD8FY= X-Received: by 2002:a17:902:6806:: with SMTP id h6-v6mr41442637plk.304.1537471127643; Thu, 20 Sep 2018 12:18:47 -0700 (PDT) Received: from localhost.localdomain ([209.121.128.187]) by smtp.gmail.com with ESMTPSA id k13-v6sm4424443pgf.37.2018.09.20.12.18.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Sep 2018 12:18:46 -0700 (PDT) From: Mathieu Poirier <mathieu.poirier@linaro.org> To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 17/44] coresight: tmc-etr: Relax collection of trace from sysfs mode Date: Thu, 20 Sep 2018 13:17:52 -0600 Message-Id: <1537471099-19781-18-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537471099-19781-1-git-send-email-mathieu.poirier@linaro.org> References: <1537471099-19781-1-git-send-email-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
coresight: next v4.19-rc4
|
expand
|
diff --git a/drivers/hwtracing/coresight/coresight-tmc-etr.c b/drivers/hwtracing/coresight/coresight-tmc-etr.c index 2d6f428176ff..bafd73e71c4c 100644 --- a/drivers/hwtracing/coresight/coresight-tmc-etr.c +++ b/drivers/hwtracing/coresight/coresight-tmc-etr.c @@ -1168,19 +1168,17 @@ int tmc_read_prepare_etr(struct tmc_drvdata *drvdata) goto out; } - /* Don't interfere if operated from Perf */ - if (drvdata->mode == CS_MODE_PERF) { - ret = -EINVAL; - goto out; - } - - /* If sysfs_buf is NULL the trace data has been read already */ + /* + * We can safely allow reads even if the ETR is operating in PERF mode, + * since the sysfs session is captured in mode specific data. + * If drvdata::sysfs_data is NULL the trace data has been read already. + */ if (!drvdata->sysfs_buf) { ret = -EINVAL; goto out; } - /* Disable the TMC if we are trying to read from a running session */ + /* Disable the TMC if we are trying to read from a running session. */ if (drvdata->mode == CS_MODE_SYSFS) tmc_etr_disable_hw(drvdata);