mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] perf tools: Sync the x86 cpufeatures header
@ 2026-11-25 18:09 TAKANO Mitsuhiro
  2026-11-25 18:09 ` [PATCH 2/2] perf build: Make check-headers.sh fail on a difference TAKANO Mitsuhiro
  0 siblings, 1 reply; 2+ messages in thread
From: TAKANO Mitsuhiro @ 2026-11-25 18:09 UTC (permalink / raw)
  To: linux-perf-users, Arnaldo Carvalho de Melo, Namhyung Kim
  Cc: Ian Rogers, Peter Zijlstra, Ingo Molnar, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Adrian Hunter, James Clark,
	linux-kernel, TAKANO Mitsuhiro

X86_FEATURE_TSA_FILL_NO was added to the kernel copy in
commit cf27412f19c9 ("x86/bugs: Mitigate TSA on AMD Zen5") and not to
the copy perf carries, so check-headers.sh reports a difference:

  diff -u tools/arch/x86/include/asm/cpufeatures.h \
         arch/x86/include/asm/cpufeatures.h

Copy the line over, which is what the script asks for.

Signed-off-by: TAKANO Mitsuhiro <takano32@gmail.com>
---
 tools/arch/x86/include/asm/cpufeatures.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/arch/x86/include/asm/cpufeatures.h b/tools/arch/x86/include/asm/cpufeatures.h
index 61930f0d4578..303467a498b8 100644
--- a/tools/arch/x86/include/asm/cpufeatures.h
+++ b/tools/arch/x86/include/asm/cpufeatures.h
@@ -432,6 +432,7 @@
 #define X86_FEATURE_CPPC_PERF_PRIO	(17*32+ 2) /* CPPC Floor Perf support */
 #define X86_FEATURE_SMCA		(17*32+ 3) /* "smca" Scalable MCA */
 #define X86_FEATURE_BTB_CTX_ISOLATION	(17*32+ 4) /* AMD: Branch predictions contexts isolated */
+#define X86_FEATURE_TSA_FILL_NO		(17*32+ 5) /* AMD CPU not vulnerable to TSA-FILL */
 
 /* Intel-defined CPU features, CPUID level 0x00000007:0 (EDX), word 18 */
 #define X86_FEATURE_AVX512_4VNNIW	(18*32+ 2) /* "avx512_4vnniw" AVX-512 Neural Network Instructions */

base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f
-- 
2.53.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 2/2] perf build: Make check-headers.sh fail on a difference
  2026-11-25 18:09 [PATCH 1/2] perf tools: Sync the x86 cpufeatures header TAKANO Mitsuhiro
@ 2026-11-25 18:09 ` TAKANO Mitsuhiro
  0 siblings, 0 replies; 2+ messages in thread
From: TAKANO Mitsuhiro @ 2026-11-25 18:09 UTC (permalink / raw)
  To: linux-perf-users, Arnaldo Carvalho de Melo, Namhyung Kim
  Cc: Ian Rogers, Peter Zijlstra, Ingo Molnar, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Adrian Hunter, James Clark,
	linux-kernel, TAKANO Mitsuhiro

The script collects the stale copies in FAILURES, prints them and exits
with the status of the last echo, so `make check-headers` succeeds on a
tree whose copies are out of sync and cannot be used as a gate.  This is
what it prints for a stale x86 cpufeatures.h:

  Warning: Kernel ABI header differences:
    diff -u tools/arch/x86/include/asm/cpufeatures.h \
           arch/x86/include/asm/cpufeatures.h

Exit 1 when the array is not empty, so a caller can tell the two apart.

The list that fills the array has a typo: include/linux/list-sort.h does
not exist, the file is list_sort.h.  check_2() tests the source file with
-f and skips the pair silently, so that copy was never checked.  The two
files are identical today, and the pair is compared now.

Verification: with a difference in either file the script exits 1 and
names the pair; with none it exits 0 and prints nothing.  Before the
change it exited 0 in both cases.

Signed-off-by: TAKANO Mitsuhiro <takano32@gmail.com>
---
 tools/perf/check-headers.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh
index 531c0e0e84df..3211e5f3dd9a 100755
--- a/tools/perf/check-headers.sh
+++ b/tools/perf/check-headers.sh
@@ -28,7 +28,7 @@ declare -a FILES=(
   "include/vdso/unaligned.h"
   "include/linux/gfp_types.h"
   "include/linux/hash.h"
-  "include/linux/list-sort.h"
+  "include/linux/list_sort.h"
   "include/uapi/linux/hw_breakpoint.h"
   "arch/x86/include/asm/cpufeatures.h"
   "arch/x86/include/asm/inat_types.h"
@@ -231,4 +231,5 @@ then
   do
     echo "  diff -u $i"
   done
+  exit 1
 fi
-- 
2.53.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-25 18:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-25 18:09 [PATCH 1/2] perf tools: Sync the x86 cpufeatures header TAKANO Mitsuhiro
2026-11-25 18:09 ` [PATCH 2/2] perf build: Make check-headers.sh fail on a difference TAKANO Mitsuhiro

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®