Linux Perf Users
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Arnaldo Carvalho de Melo" <acme@kernel.org>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v2 06/12] tools arch x86: Sync the msr-index.h copy with the kernel sources
Date: Wed, 21 Oct 2026 22:45:39 +0000	[thread overview]
Message-ID: <sashiko-outbox-180734@kernel.org> (raw)
In-Reply-To: <20261021223555.28372-7-acme@kernel.org>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] tools arch x86: msr-index.h sync reverts ARCH_PEBS_VECR_* macros
--

commit 78affd0f60ae68f3b52a636d7f03411361f2bbe0
Author: Arnaldo Carvalho de Melo <acme@redhat.com>

tools arch x86: Sync the msr-index.h copy with the kernel sources

This commit synchronizes tools/arch/x86/include/asm/msr-index.h with the
kernel header to pick up thermal interrupt bit definitions from commit
ac5cc691eb4a ("x86/thermal: Add bit definitions for Intel Directed Package
Thermal Interrupt").

> diff --git a/tools/arch/x86/include/asm/msr-index.h b/tools/arch/x86/include/asm/msr-index.h
> index 9c26d4075c5f4..3a8e51a0c9e88 100644
> --- a/tools/arch/x86/include/asm/msr-index.h
> +++ b/tools/arch/x86/include/asm/msr-index.h
> @@ -350,13 +350,6 @@
>  #define ARCH_PEBS_LBR_SHIFT		40
>  #define ARCH_PEBS_LBR			(0x3ull << ARCH_PEBS_LBR_SHIFT)
>  #define ARCH_PEBS_VECR_XMM		BIT_ULL(49)
> -#define ARCH_PEBS_VECR_YMMH		BIT_ULL(50)
> -#define ARCH_PEBS_VECR_EGPRS		BIT_ULL(51)
> -#define ARCH_PEBS_VECR_OPMASK		BIT_ULL(53)
> -#define ARCH_PEBS_VECR_ZMMH		BIT_ULL(54)
> -#define ARCH_PEBS_VECR_H16ZMM		BIT_ULL(55)
> -#define ARCH_PEBS_VECR_EXT_SHIFT	49
> -#define ARCH_PEBS_VECR_EXT		(0x7full << ARCH_PEBS_VECR_EXT_SHIFT)
>  #define ARCH_PEBS_GPR			BIT_ULL(61)
>  #define ARCH_PEBS_AUX			BIT_ULL(62)
>  #define ARCH_PEBS_EN			BIT_ULL(63)

[Severity: Medium]
Does syncing tools/arch/x86/include/asm/msr-index.h by overwriting it with
arch/x86/include/asm/msr-index.h unintentionally revert commit 7846bf499da3fe
("tools headers: Sync x86 headers with kernel sources")?

Commit 7846bf499da3fe added ARCH_PEBS_VECR_YMMH, ARCH_PEBS_VECR_EGPRS,
ARCH_PEBS_VECR_OPMASK, ARCH_PEBS_VECR_ZMMH, ARCH_PEBS_VECR_H16ZMM,
ARCH_PEBS_VECR_EXT_SHIFT, and ARCH_PEBS_VECR_EXT to
tools/arch/x86/include/asm/msr-index.h alongside commit eb89aef367e470 before
those kernel changes landed in arch/x86/include/asm/msr-index.h in this tree.

In tools/perf/scripts/sync-headers.sh, kernel_matches_previous_tools_state()
checks whether the kernel header's current blob exists in the history of the
tools header:

tools/perf/scripts/sync-headers.sh:kernel_matches_previous_tools_state() {
	local kernel_path="$1"
	local tools_path="$2"
	local kernel_blob

	kernel_blob=$(git hash-object "$kernel_path" 2>/dev/null) || return 1
	[[ -n "$(git log --format=%h -1 --find-object="$kernel_blob" -- "$tools_path" 2>/dev/null)" ]]
}

Because arch/x86/include/asm/msr-index.h and
tools/arch/x86/include/asm/msr-index.h both diverged with independent commits
(ac5cc691eb4a and 7846bf499da3fe) since their last common sync point
(369e91bd201d15), kernel_matches_previous_tools_state() returns false and
process_header() overwrites the tools copy with the kernel copy.

While the commit message states this only picks up commit ac5cc691eb4a
("x86/thermal: Add bit definitions for Intel Directed Package Thermal
Interrupt"), should the ARCH_PEBS_VECR_* definitions from commit
7846bf499da3fe be preserved here?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261021223555.28372-1-acme@kernel.org?part=6

  reply	other threads:[~2026-10-21 22:45 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-21 22:35 [PATCH v2 00/12] perf tools: Add a script to sync the header copies with the kernel sources Arnaldo Carvalho de Melo
2026-10-21 22:35 ` [PATCH v2 01/12] perf tools: Add script and make target to sync the header copies with the kernel Arnaldo Carvalho de Melo
2026-10-21 22:53   ` sashiko-bot
2026-10-21 22:35 ` [PATCH v2 02/12] tools headers UAPI: Sync linux/if_addr.h with the kernel sources Arnaldo Carvalho de Melo
2026-10-21 22:38   ` sashiko-bot
2026-10-21 22:35 ` [PATCH v2 03/12] tools headers UAPI: Sync linux/rtnetlink.h " Arnaldo Carvalho de Melo
2026-10-21 22:39   ` sashiko-bot
2026-10-21 22:35 ` [PATCH v2 04/12] tools headers: Sync linux/gfp_types.h " Arnaldo Carvalho de Melo
2026-10-21 22:38   ` sashiko-bot
2026-10-21 22:35 ` [PATCH v2 05/12] tools headers x86 cpufeatures: Sync " Arnaldo Carvalho de Melo
2026-10-21 22:42   ` sashiko-bot
2026-10-21 22:35 ` [PATCH v2 06/12] tools arch x86: Sync the msr-index.h copy " Arnaldo Carvalho de Melo
2026-10-21 22:45   ` sashiko-bot [this message]
2026-10-21 22:35 ` [PATCH v2 07/12] perf beauty: Update copy of linux/socket.h " Arnaldo Carvalho de Melo
2026-10-21 22:41   ` sashiko-bot
2026-10-21 22:35 ` [PATCH v2 08/12] tools headers: Sync UAPI linux/fcntl.h " Arnaldo Carvalho de Melo
2026-10-21 22:39   ` sashiko-bot
2026-10-21 22:35 ` [PATCH v2 09/12] tools headers: Sync UAPI linux/fs.h " Arnaldo Carvalho de Melo
2026-10-21 22:42   ` sashiko-bot
2026-10-21 22:35 ` [PATCH v2 10/12] tools headers: Sync UAPI linux/mount.h " Arnaldo Carvalho de Melo
2026-10-21 22:41   ` sashiko-bot
2026-10-21 22:35 ` [PATCH v2 11/12] tools headers: Sync UAPI sound/asound.h with " Arnaldo Carvalho de Melo
2026-10-21 22:39   ` sashiko-bot
2026-10-21 22:35 ` [PATCH v2 12/12] tools headers: Sync KVM headers with the " Arnaldo Carvalho de Melo
2026-10-21 22:55   ` sashiko-bot

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=sashiko-outbox-180734@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=acme@kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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