From patchwork Mon Jan 17 12:44:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: German Gomez X-Patchwork-Id: 12715396 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4BB73C433F5 for ; Mon, 17 Jan 2022 12:46:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=1yfemNyL1B0KowXPQsJ1qy0yIqmHDqbDcblBgIZ0Jy0=; b=jXHfaSh03bqfs3 u6OrLpoB04PVcfFCVwyny1xFfpgHMITw782AKgG2/R4gncSysWbsKFK9DDCXVixIt/jtR8u7SuKIe CjYufO1CbVwl6HBkv6aumgosn32JyWI2nlNqXIWlOYXAkLNmyCohbgTqxb0tcbIAg3/Pcl2jfXpqO q0F0XFgWhjI5kGnLs6vuz2hHhrQIUd1yPkL7qukZPlofjXL4fP7eK+7j1hdtzBgTiZqJuNMjoX8mp joilovkap8vtx20/U28M74GQDC4kHh8wnYBa2XZRmRY688E8bnyy9BTWRGGgFPbSjoomuOUWoiJEd awRCGlLQRK+niF2TyBnA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n9RO6-00Ewts-AD; Mon, 17 Jan 2022 12:45:30 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n9RO2-00EwrR-E2 for linux-arm-kernel@lists.infradead.org; Mon, 17 Jan 2022 12:45:27 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2984A6D; Mon, 17 Jan 2022 04:45:23 -0800 (PST) Received: from e127744.arm.com (unknown [10.57.36.133]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D5ABA3F73D; Mon, 17 Jan 2022 04:45:21 -0800 (PST) From: German Gomez To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, will@kernel.org, mark.rutland@arm.com, james.clark@arm.com, leo.yan@linaro.org Cc: German Gomez Subject: [RFC PATCH 0/2] perf: arm_spe: Fix consistency of CONTEXT packets in SPE driver Date: Mon, 17 Jan 2022 12:44:30 +0000 Message-Id: <20220117124432.3119132-1-german.gomez@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220117_044526_580511_DD22134A X-CRM114-Status: UNSURE ( 7.92 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Applies a couple of small changes to the arm_spe_pmu driver. We are seeing context packets in an inconsistent number of SPE records even when the perf-tool runs without the needed capabilities. This is fixed in [1/2]. We're also allowing CONTEXT packets to be collected in per-cpu events in [2/2]. I'm sending as an RFC because it's the first time I change driver code. Also I'm not 100% sure of the approach in [2/2] (from a security and/or implementation standpoint). Thanks, German - [PATCH 1/2] Fixes the consistency issue with the context packets. - [PATCH 2/2] Enables context packets in per-cpu events. German Gomez (2): perf: arm_spe: Fix consistency of PMSCR register bit CX perf: arm_spe: Enable CONTEXT packets in SPE traces if the profiler runs in CPU mode. drivers/perf/arm_spe_pmu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)