mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: German Gomez <german.gomez@arm.com>
To: linux-eng@arm.com
Cc: james.clark@arm.com, German Gomez <german.gomez@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] perf: arm_spe: Enable CONTEXT packets if profiling in CPU mode
Date: Thu, 13 Jan 2022 17:54:17 +0000	[thread overview]
Message-ID: <20220113175417.5523-3-german.gomez@arm.com> (raw)
In-Reply-To: <20220113175417.5523-1-german.gomez@arm.com>

Enable CONTEXT packets in SPE traces if the profiler runs in CPU mode.

Signed-off-by: German Gomez <german.gomez@arm.com>
---
 drivers/perf/arm_spe_pmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/perf/arm_spe_pmu.c b/drivers/perf/arm_spe_pmu.c
index 8515bf85c..7d9a7fa4f 100644
--- a/drivers/perf/arm_spe_pmu.c
+++ b/drivers/perf/arm_spe_pmu.c
@@ -711,7 +711,7 @@ static int arm_spe_pmu_event_init(struct perf_event *event)
 	    !(spe_pmu->features & SPE_PMU_FEAT_FILT_LAT))
 		return -EOPNOTSUPP;
 
-	spe_pmu->pmscr_cx = perfmon_capable();
+	spe_pmu->pmscr_cx = perfmon_capable() || (event->cpu != -1);
 	reg = arm_spe_event_to_pmscr(event);
 	if (!perfmon_capable() &&
 	    (reg & (BIT(SYS_PMSCR_EL1_PA_SHIFT) |
-- 
2.25.1


  parent reply	other threads:[~2022-01-13 17:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-13 17:54 [PATCH 0/2] perf: arm_spe: make the PMSCR CX bit[3] consistent across the session German Gomez
2022-01-13 17:54 ` [PATCH 1/2] " German Gomez
2022-01-13 17:54 ` German Gomez [this message]
2022-01-14  9:31 ` [PATCH 0/2] " German Gomez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220113175417.5523-3-german.gomez@arm.com \
    --to=german.gomez@arm.com \
    --cc=james.clark@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-eng@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®