From patchwork Tue Oct 27 13:49:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 312997 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1E7CC55178 for ; Tue, 27 Oct 2020 14:14:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7C46D22263 for ; Tue, 27 Oct 2020 14:14:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603808048; bh=7SUS70GJEZwnwKJafFVVsx4lhLtPP4fRAGwyWt3H+Gg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=GdVWvDOS5KLTw4ZuQ5vKwJglLjMwdKhNRv0iJHfU1me3crj1gosZLDkP4RKiiFJTa /RZzgLrR3bqDouzr3XYJ9B1oTIh/O5Z65UoDkGho5PHw2PGvfNI5s62GGxKjXEW92q he+8oq5aJZawC5sbHJRFtZQ5C0tewum3okD2XusA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756552AbgJ0OOH (ORCPT ); Tue, 27 Oct 2020 10:14:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:35596 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756548AbgJ0OOD (ORCPT ); Tue, 27 Oct 2020 10:14:03 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 03D9B2072D; Tue, 27 Oct 2020 14:14:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603808043; bh=7SUS70GJEZwnwKJafFVVsx4lhLtPP4fRAGwyWt3H+Gg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=djyaWfZCKN3rclGezPpo7c1jRn35949ogEIVbHbZxz8HNY2dyejV1156vmUMOqvQ+ yOjedln7dAv7ItwaToNowwifQW/nmsDd6fbaHY0p/Xas69qGmCA5W9czC6pPrmxIoM Hh0cpyrNQ7klO+w+s6y6XXNB/XT8Fx9dri/52bT8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Al Grant , "Peter Zijlstra (Intel)" , Andi Kleen , Sasha Levin Subject: [PATCH 4.14 134/191] perf: correct SNOOPX field offset Date: Tue, 27 Oct 2020 14:49:49 +0100 Message-Id: <20201027134916.146416665@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134909.701581493@linuxfoundation.org> References: <20201027134909.701581493@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Al Grant [ Upstream commit f3d301c1f2f5676465cdf3259737ea19cc82731f ] perf_event.h has macros that define the field offsets in the data_src bitmask in perf records. The SNOOPX and REMOTE offsets were both 37. These are distinct fields, and the bitfield layout in perf_mem_data_src confirms that SNOOPX should be at offset 38. Fixes: 52839e653b5629bd ("perf tools: Add support for printing new mem_info encodings") Signed-off-by: Al Grant Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Link: https://lkml.kernel.org/r/4ac9f5cc-4388-b34a-9999-418a4099415d@foss.arm.com Signed-off-by: Sasha Levin --- include/uapi/linux/perf_event.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index 362493a2f950b..fc72a3839c9dc 100644 --- a/include/uapi/linux/perf_event.h +++ b/include/uapi/linux/perf_event.h @@ -1033,7 +1033,7 @@ union perf_mem_data_src { #define PERF_MEM_SNOOPX_FWD 0x01 /* forward */ /* 1 free */ -#define PERF_MEM_SNOOPX_SHIFT 37 +#define PERF_MEM_SNOOPX_SHIFT 38 /* locked instruction */ #define PERF_MEM_LOCK_NA 0x01 /* not available */