Skip to content

Commit cfeb252

Browse files
committed
Merge tag 'perf-core-2022-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf events updates from Ingo Molnar: "Platform PMU changes: - x86/intel: - Add new Intel Alder Lake and Raptor Lake support - x86/amd: - AMD Zen4 IBS extensions support - Add AMD PerfMonV2 support - Add AMD Fam19h Branch Sampling support Generic changes: - signal: Deliver SIGTRAP on perf event asynchronously if blocked Perf instrumentation can be driven via SIGTRAP, but this causes a problem when SIGTRAP is blocked by a task & terminate the task. Allow user-space to request these signals asynchronously (after they get unblocked) & also give the information to the signal handler when this happens: "To give user space the ability to clearly distinguish synchronous from asynchronous signals, introduce siginfo_t::si_perf_flags and TRAP_PERF_FLAG_ASYNC (opted for flags in case more binary information is required in future). The resolution to the problem is then to (a) no longer force the signal (avoiding the terminations), but (b) tell user space via si_perf_flags if the signal was synchronous or not, so that such signals can be handled differently (e.g. let user space decide to ignore or consider the data imprecise). " - Unify/standardize the /sys/devices/cpu/events/* output format. - Misc fixes & cleanups" * tag 'perf-core-2022-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (32 commits) perf/x86/amd/core: Fix reloading events for SVM perf/x86/amd: Run AMD BRS code only on supported hw perf/x86/amd: Fix AMD BRS period adjustment perf/x86/amd: Remove unused variable 'hwc' perf/ibs: Fix comment perf/amd/ibs: Advertise zen4_ibs_extensions as pmu capability attribute perf/amd/ibs: Add support for L3 miss filtering perf/amd/ibs: Use ->is_visible callback for dynamic attributes perf/amd/ibs: Cascade pmu init functions' return value perf/x86/uncore: Add new Alder Lake and Raptor Lake support perf/x86/uncore: Clean up uncore_pci_ids[] perf/x86/cstate: Add new Alder Lake and Raptor Lake support perf/x86/msr: Add new Alder Lake and Raptor Lake support perf/x86: Add new Alder Lake and Raptor Lake support perf/amd/ibs: Use interrupt regs ip for stack unwinding perf/x86/amd/core: Add PerfMonV2 overflow handling perf/x86/amd/core: Add PerfMonV2 counter control perf/x86/amd/core: Detect available counters perf/x86/amd/core: Detect PerfMonV2 support x86/msr: Add PerfCntrGlobal* registers ...
2 parents 22922de + bae19fd commit cfeb252

File tree

34 files changed

+1445
-414
lines changed

34 files changed

+1445
-414
lines changed

arch/arm/kernel/signal.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,7 @@ static_assert(offsetof(siginfo_t, si_upper) == 0x18);
708708
static_assert(offsetof(siginfo_t, si_pkey) == 0x14);
709709
static_assert(offsetof(siginfo_t, si_perf_data) == 0x10);
710710
static_assert(offsetof(siginfo_t, si_perf_type) == 0x14);
711+
static_assert(offsetof(siginfo_t, si_perf_flags) == 0x18);
711712
static_assert(offsetof(siginfo_t, si_band) == 0x0c);
712713
static_assert(offsetof(siginfo_t, si_fd) == 0x10);
713714
static_assert(offsetof(siginfo_t, si_call_addr) == 0x0c);

arch/arm64/kernel/signal.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,6 +1179,7 @@ static_assert(offsetof(siginfo_t, si_upper) == 0x28);
11791179
static_assert(offsetof(siginfo_t, si_pkey) == 0x20);
11801180
static_assert(offsetof(siginfo_t, si_perf_data) == 0x18);
11811181
static_assert(offsetof(siginfo_t, si_perf_type) == 0x20);
1182+
static_assert(offsetof(siginfo_t, si_perf_flags) == 0x24);
11821183
static_assert(offsetof(siginfo_t, si_band) == 0x10);
11831184
static_assert(offsetof(siginfo_t, si_fd) == 0x18);
11841185
static_assert(offsetof(siginfo_t, si_call_addr) == 0x10);

arch/arm64/kernel/signal32.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,7 @@ static_assert(offsetof(compat_siginfo_t, si_upper) == 0x18);
487487
static_assert(offsetof(compat_siginfo_t, si_pkey) == 0x14);
488488
static_assert(offsetof(compat_siginfo_t, si_perf_data) == 0x10);
489489
static_assert(offsetof(compat_siginfo_t, si_perf_type) == 0x14);
490+
static_assert(offsetof(compat_siginfo_t, si_perf_flags) == 0x18);
490491
static_assert(offsetof(compat_siginfo_t, si_band) == 0x0c);
491492
static_assert(offsetof(compat_siginfo_t, si_fd) == 0x10);
492493
static_assert(offsetof(compat_siginfo_t, si_call_addr) == 0x0c);

arch/m68k/kernel/signal.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,7 @@ static inline void siginfo_build_tests(void)
625625
/* _sigfault._perf */
626626
BUILD_BUG_ON(offsetof(siginfo_t, si_perf_data) != 0x10);
627627
BUILD_BUG_ON(offsetof(siginfo_t, si_perf_type) != 0x14);
628+
BUILD_BUG_ON(offsetof(siginfo_t, si_perf_flags) != 0x18);
628629

629630
/* _sigpoll */
630631
BUILD_BUG_ON(offsetof(siginfo_t, si_band) != 0x0c);

arch/sparc/kernel/signal32.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,5 +779,6 @@ static_assert(offsetof(compat_siginfo_t, si_upper) == 0x18);
779779
static_assert(offsetof(compat_siginfo_t, si_pkey) == 0x14);
780780
static_assert(offsetof(compat_siginfo_t, si_perf_data) == 0x10);
781781
static_assert(offsetof(compat_siginfo_t, si_perf_type) == 0x14);
782+
static_assert(offsetof(compat_siginfo_t, si_perf_flags) == 0x18);
782783
static_assert(offsetof(compat_siginfo_t, si_band) == 0x0c);
783784
static_assert(offsetof(compat_siginfo_t, si_fd) == 0x10);

arch/sparc/kernel/signal_64.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,5 +590,6 @@ static_assert(offsetof(siginfo_t, si_upper) == 0x28);
590590
static_assert(offsetof(siginfo_t, si_pkey) == 0x20);
591591
static_assert(offsetof(siginfo_t, si_perf_data) == 0x18);
592592
static_assert(offsetof(siginfo_t, si_perf_type) == 0x20);
593+
static_assert(offsetof(siginfo_t, si_perf_flags) == 0x24);
593594
static_assert(offsetof(siginfo_t, si_band) == 0x10);
594595
static_assert(offsetof(siginfo_t, si_fd) == 0x14);

arch/x86/events/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,12 @@ config PERF_EVENTS_AMD_UNCORE
4444

4545
To compile this driver as a module, choose M here: the
4646
module will be called 'amd-uncore'.
47+
48+
config PERF_EVENTS_AMD_BRS
49+
depends on PERF_EVENTS && CPU_SUP_AMD
50+
bool "AMD Zen3 Branch Sampling support"
51+
help
52+
Enable AMD Zen3 branch sampling support (BRS) which samples up to
53+
16 consecutive taken branches in registers.
54+
4755
endmenu

arch/x86/events/amd/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# SPDX-License-Identifier: GPL-2.0
22
obj-$(CONFIG_CPU_SUP_AMD) += core.o
3+
obj-$(CONFIG_PERF_EVENTS_AMD_BRS) += brs.o
34
obj-$(CONFIG_PERF_EVENTS_AMD_POWER) += power.o
45
obj-$(CONFIG_X86_LOCAL_APIC) += ibs.o
56
obj-$(CONFIG_PERF_EVENTS_AMD_UNCORE) += amd-uncore.o

0 commit comments

Comments
 (0)