Commit b2760b83 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'perf-tools-fixes-for-v6.12-1-2024-10-08' of...

Merge tag 'perf-tools-fixes-for-v6.12-1-2024-10-08' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools

Pull perf tools fixes from Arnaldo Carvalho de Melo:

 - Fix an assert() to handle captured and unprocessed ARM CoreSight CPU
   traces

 - Fix static build compilation error when libdw isn't installed or is
   too old

 - Add missing include when building with
   !HAVE_DWARF_GETLOCATIONS_SUPPORT

 - Add missing refcount put on 32-bit DSOs

 - Fix disassembly of user space binaries by setting the binary_type of
   DSO when loading

 - Update headers with the kernel sources, including asound.h, sched.h,
   fcntl, msr-index.h, irq_vectors.h, socket.h, list_sort.c and arm64's
   cputype.h

* tag 'perf-tools-fixes-for-v6.12-1-2024-10-08' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools:
  perf cs-etm: Fix the assert() to handle captured and unprocessed cpu trace
  perf build: Fix build feature-dwarf_getlocations fail for old libdw
  perf build: Fix static compilation error when libdw is not installed
  perf dwarf-aux: Fix build with !HAVE_DWARF_GETLOCATIONS_SUPPORT
  tools headers arm64: Sync arm64's cputype.h with the kernel sources
  perf tools: Cope with differences for lib/list_sort.c copy from the kernel
  tools check_headers.sh: Add check variant that excludes some hunks
  perf beauty: Update copy of linux/socket.h with the kernel sources
  tools headers UAPI: Sync the linux/in.h with the kernel sources
  perf trace beauty: Update the arch/x86/include/asm/irq_vectors.h copy with the kernel sources
  tools arch x86: Sync the msr-index.h copy with the kernel sources
  tools include UAPI: Sync linux/fcntl.h copy with the kernel sources
  tools include UAPI: Sync linux/sched.h copy with the kernel sources
  tools include UAPI: Sync sound/asound.h copy with the kernel sources
  perf vdso: Missed put on 32-bit dsos
  perf symbol: Set binary_type of dso when loading
parents 87d6aab2 e934a35e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -143,6 +143,7 @@
#define APPLE_CPU_PART_M2_AVALANCHE_MAX	0x039

#define AMPERE_CPU_PART_AMPERE1		0xAC3
#define AMPERE_CPU_PART_AMPERE1A	0xAC4

#define MICROSOFT_CPU_PART_AZURE_COBALT_100	0xD49 /* Based on r0p0 of ARM Neoverse N2 */

@@ -212,6 +213,7 @@
#define MIDR_APPLE_M2_BLIZZARD_MAX MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M2_BLIZZARD_MAX)
#define MIDR_APPLE_M2_AVALANCHE_MAX MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M2_AVALANCHE_MAX)
#define MIDR_AMPERE1 MIDR_CPU_MODEL(ARM_CPU_IMP_AMPERE, AMPERE_CPU_PART_AMPERE1)
#define MIDR_AMPERE1A MIDR_CPU_MODEL(ARM_CPU_IMP_AMPERE, AMPERE_CPU_PART_AMPERE1A)
#define MIDR_MICROSOFT_AZURE_COBALT_100 MIDR_CPU_MODEL(ARM_CPU_IMP_MICROSOFT, MICROSOFT_CPU_PART_AZURE_COBALT_100)

/* Fujitsu Erratum 010001 affects A64FX 1.0 and 1.1, (v0r0 and v1r0) */
+2 −0
Original line number Diff line number Diff line
@@ -247,6 +247,8 @@
#define MSR_INTEGRITY_CAPS_ARRAY_BIST          BIT(MSR_INTEGRITY_CAPS_ARRAY_BIST_BIT)
#define MSR_INTEGRITY_CAPS_PERIODIC_BIST_BIT	4
#define MSR_INTEGRITY_CAPS_PERIODIC_BIST	BIT(MSR_INTEGRITY_CAPS_PERIODIC_BIST_BIT)
#define MSR_INTEGRITY_CAPS_SBAF_BIT		8
#define MSR_INTEGRITY_CAPS_SBAF			BIT(MSR_INTEGRITY_CAPS_SBAF_BIT)
#define MSR_INTEGRITY_CAPS_SAF_GEN_MASK	GENMASK_ULL(10, 9)

#define MSR_LBR_NHM_FROM		0x00000680
+4 −1
Original line number Diff line number Diff line
@@ -172,7 +172,7 @@ DWARFLIBS := -ldw
ifeq ($(findstring -static,${LDFLAGS}),-static)
  DWARFLIBS += -lelf -lz -llzma -lbz2 -lzstd

  LIBDW_VERSION := $(shell $(PKG_CONFIG) --modversion libdw)
  LIBDW_VERSION := $(shell $(PKG_CONFIG) --modversion libdw).0.0
  LIBDW_VERSION_1 := $(word 1, $(subst ., ,$(LIBDW_VERSION)))
  LIBDW_VERSION_2 := $(word 2, $(subst ., ,$(LIBDW_VERSION)))

@@ -181,6 +181,9 @@ ifeq ($(findstring -static,${LDFLAGS}),-static)
  ifeq ($(shell test $(LIBDW_VERSION_2) -lt 177; echo $$?),0)
    DWARFLIBS += -lebl
  endif

  # Must put -ldl after -lebl for dependency
  DWARFLIBS += -ldl
endif

$(OUTPUT)test-dwarf.bin:
+1 −1
Original line number Diff line number Diff line
@@ -141,7 +141,7 @@ struct in_addr {
 */
#define IP_PMTUDISC_INTERFACE		4
/* weaker version of IP_PMTUDISC_INTERFACE, which allows packets to get
 * fragmented if they exeed the interface mtu
 * fragmented if they exceed the interface mtu
 */
#define IP_PMTUDISC_OMIT		5

+5 −2
Original line number Diff line number Diff line
@@ -147,9 +147,9 @@ ifdef LIBDW_DIR
endif
DWARFLIBS := -ldw
ifeq ($(findstring -static,${LDFLAGS}),-static)
  DWARFLIBS += -lelf -ldl -lz -llzma -lbz2 -lzstd
  DWARFLIBS += -lelf -lz -llzma -lbz2 -lzstd

  LIBDW_VERSION := $(shell $(PKG_CONFIG) --modversion libdw)
  LIBDW_VERSION := $(shell $(PKG_CONFIG) --modversion libdw).0.0
  LIBDW_VERSION_1 := $(word 1, $(subst ., ,$(LIBDW_VERSION)))
  LIBDW_VERSION_2 := $(word 2, $(subst ., ,$(LIBDW_VERSION)))

@@ -158,6 +158,9 @@ ifeq ($(findstring -static,${LDFLAGS}),-static)
  ifeq ($(shell test $(LIBDW_VERSION_2) -lt 177; echo $$?),0)
    DWARFLIBS += -lebl
  endif

  # Must put -ldl after -lebl for dependency
  DWARFLIBS += -ldl
endif
FEATURE_CHECK_CFLAGS-libdw-dwarf-unwind := $(LIBDW_CFLAGS)
FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind := $(LIBDW_LDFLAGS) $(DWARFLIBS)
Loading