From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
patches@lists.linux.dev, Kan Liang <kan.liang@linux.intel.com>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
Andi Kleen <ak@linux.intel.com>, Ian Rogers <irogers@google.com>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.10 012/263] perf/x86: Support counter mask
Date: Mon, 12 Aug 2024 18:00:13 +0200 [thread overview]
Message-ID: <20240812160147.009227137@linuxfoundation.org> (raw)
In-Reply-To: <20240812160146.517184156@linuxfoundation.org>
6.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kan Liang <kan.liang@linux.intel.com>
[ Upstream commit 722e42e45c2f1c6d1adec7813651dba5139f52f4 ]
The current perf assumes that both GP and fixed counters are contiguous.
But it's not guaranteed on newer Intel platforms or in a virtualization
environment.
Use the counter mask to replace the number of counters for both GP and
the fixed counters. For the other ARCHs or old platforms which don't
support a counter mask, using GENMASK_ULL(num_counter - 1, 0) to
replace. There is no functional change for them.
The interface to KVM is not changed. The number of counters still be
passed to KVM. It can be updated later separately.
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Link: https://lkml.kernel.org/r/20240626143545.480761-3-kan.liang@linux.intel.com
Stable-dep-of: f73cefa3b72e ("perf/x86: Fix smp_processor_id()-in-preemptible warnings")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/x86/events/amd/core.c | 24 ++---
arch/x86/events/core.c | 98 ++++++++++----------
arch/x86/events/intel/core.c | 164 ++++++++++++++++-----------------
arch/x86/events/intel/ds.c | 19 ++--
arch/x86/events/intel/knc.c | 2 +-
arch/x86/events/intel/p4.c | 10 +-
arch/x86/events/intel/p6.c | 2 +-
arch/x86/events/perf_event.h | 47 ++++++++--
arch/x86/events/zhaoxin/core.c | 12 +--
9 files changed, 199 insertions(+), 179 deletions(-)
diff --git a/arch/x86/events/amd/core.c b/arch/x86/events/amd/core.c
index 18bfe3451f3aa..920e3a640cadd 100644
--- a/arch/x86/events/amd/core.c
+++ b/arch/x86/events/amd/core.c
@@ -432,7 +432,7 @@ static void __amd_put_nb_event_constraints(struct cpu_hw_events *cpuc,
* be removed on one CPU at a time AND PMU is disabled
* when we come here
*/
- for (i = 0; i < x86_pmu.num_counters; i++) {
+ for_each_set_bit(i, x86_pmu.cntr_mask, X86_PMC_IDX_MAX) {
struct perf_event *tmp = event;
if (try_cmpxchg(nb->owners + i, &tmp, NULL))
@@ -501,7 +501,7 @@ __amd_get_nb_event_constraints(struct cpu_hw_events *cpuc, struct perf_event *ev
* because of successive calls to x86_schedule_events() from
* hw_perf_group_sched_in() without hw_perf_enable()
*/
- for_each_set_bit(idx, c->idxmsk, x86_pmu.num_counters) {
+ for_each_set_bit(idx, c->idxmsk, x86_pmu_max_num_counters(NULL)) {
if (new == -1 || hwc->idx == idx)
/* assign free slot, prefer hwc->idx */
old = cmpxchg(nb->owners + idx, NULL, event);
@@ -544,7 +544,7 @@ static struct amd_nb *amd_alloc_nb(int cpu)
/*
* initialize all possible NB constraints
*/
- for (i = 0; i < x86_pmu.num_counters; i++) {
+ for_each_set_bit(i, x86_pmu.cntr_mask, X86_PMC_IDX_MAX) {
__set_bit(i, nb->event_constraints[i].idxmsk);
nb->event_constraints[i].weight = 1;
}
@@ -737,7 +737,7 @@ static void amd_pmu_check_overflow(void)
* counters are always enabled when this function is called and
* ARCH_PERFMON_EVENTSEL_INT is always set.
*/
- for (idx = 0; idx < x86_pmu.num_counters; idx++) {
+ for_each_set_bit(idx, x86_pmu.cntr_mask, X86_PMC_IDX_MAX) {
if (!test_bit(idx, cpuc->active_mask))
continue;
@@ -757,7 +757,7 @@ static void amd_pmu_enable_all(int added)
amd_brs_enable_all();
- for (idx = 0; idx < x86_pmu.num_counters; idx++) {
+ for_each_set_bit(idx, x86_pmu.cntr_mask, X86_PMC_IDX_MAX) {
/* only activate events which are marked as active */
if (!test_bit(idx, cpuc->active_mask))
continue;
@@ -980,7 +980,7 @@ static int amd_pmu_v2_handle_irq(struct pt_regs *regs)
/* Clear any reserved bits set by buggy microcode */
status &= amd_pmu_global_cntr_mask;
- for (idx = 0; idx < x86_pmu.num_counters; idx++) {
+ for_each_set_bit(idx, x86_pmu.cntr_mask, X86_PMC_IDX_MAX) {
if (!test_bit(idx, cpuc->active_mask))
continue;
@@ -1315,7 +1315,7 @@ static __initconst const struct x86_pmu amd_pmu = {
.addr_offset = amd_pmu_addr_offset,
.event_map = amd_pmu_event_map,
.max_events = ARRAY_SIZE(amd_perfmon_event_map),
- .num_counters = AMD64_NUM_COUNTERS,
+ .cntr_mask64 = GENMASK_ULL(AMD64_NUM_COUNTERS - 1, 0),
.add = amd_pmu_add_event,
.del = amd_pmu_del_event,
.cntval_bits = 48,
@@ -1414,7 +1414,7 @@ static int __init amd_core_pmu_init(void)
*/
x86_pmu.eventsel = MSR_F15H_PERF_CTL;
x86_pmu.perfctr = MSR_F15H_PERF_CTR;
- x86_pmu.num_counters = AMD64_NUM_COUNTERS_CORE;
+ x86_pmu.cntr_mask64 = GENMASK_ULL(AMD64_NUM_COUNTERS_CORE - 1, 0);
/* Check for Performance Monitoring v2 support */
if (boot_cpu_has(X86_FEATURE_PERFMON_V2)) {
@@ -1424,9 +1424,9 @@ static int __init amd_core_pmu_init(void)
x86_pmu.version = 2;
/* Find the number of available Core PMCs */
- x86_pmu.num_counters = ebx.split.num_core_pmc;
+ x86_pmu.cntr_mask64 = GENMASK_ULL(ebx.split.num_core_pmc - 1, 0);
- amd_pmu_global_cntr_mask = (1ULL << x86_pmu.num_counters) - 1;
+ amd_pmu_global_cntr_mask = x86_pmu.cntr_mask64;
/* Update PMC handling functions */
x86_pmu.enable_all = amd_pmu_v2_enable_all;
@@ -1454,12 +1454,12 @@ static int __init amd_core_pmu_init(void)
* even numbered counter that has a consecutive adjacent odd
* numbered counter following it.
*/
- for (i = 0; i < x86_pmu.num_counters - 1; i += 2)
+ for (i = 0; i < x86_pmu_max_num_counters(NULL) - 1; i += 2)
even_ctr_mask |= BIT_ULL(i);
pair_constraint = (struct event_constraint)
__EVENT_CONSTRAINT(0, even_ctr_mask, 0,
- x86_pmu.num_counters / 2, 0,
+ x86_pmu_max_num_counters(NULL) / 2, 0,
PERF_X86_EVENT_PAIR);
x86_pmu.get_event_constraints = amd_get_event_constraints_f17h;
diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c
index acd367c453341..0c51cfdf76092 100644
--- a/arch/x86/events/core.c
+++ b/arch/x86/events/core.c
@@ -189,29 +189,31 @@ static DEFINE_MUTEX(pmc_reserve_mutex);
#ifdef CONFIG_X86_LOCAL_APIC
-static inline int get_possible_num_counters(void)
+static inline u64 get_possible_counter_mask(void)
{
- int i, num_counters = x86_pmu.num_counters;
+ u64 cntr_mask = x86_pmu.cntr_mask64;
+ int i;
if (!is_hybrid())
- return num_counters;
+ return cntr_mask;
for (i = 0; i < x86_pmu.num_hybrid_pmus; i++)
- num_counters = max_t(int, num_counters, x86_pmu.hybrid_pmu[i].num_counters);
+ cntr_mask |= x86_pmu.hybrid_pmu[i].cntr_mask64;
- return num_counters;
+ return cntr_mask;
}
static bool reserve_pmc_hardware(void)
{
- int i, num_counters = get_possible_num_counters();
+ u64 cntr_mask = get_possible_counter_mask();
+ int i, end;
- for (i = 0; i < num_counters; i++) {
+ for_each_set_bit(i, (unsigned long *)&cntr_mask, X86_PMC_IDX_MAX) {
if (!reserve_perfctr_nmi(x86_pmu_event_addr(i)))
goto perfctr_fail;
}
- for (i = 0; i < num_counters; i++) {
+ for_each_set_bit(i, (unsigned long *)&cntr_mask, X86_PMC_IDX_MAX) {
if (!reserve_evntsel_nmi(x86_pmu_config_addr(i)))
goto eventsel_fail;
}
@@ -219,13 +221,14 @@ static bool reserve_pmc_hardware(void)
return true;
eventsel_fail:
- for (i--; i >= 0; i--)
+ end = i;
+ for_each_set_bit(i, (unsigned long *)&cntr_mask, end)
release_evntsel_nmi(x86_pmu_config_addr(i));
-
- i = num_counters;
+ i = X86_PMC_IDX_MAX;
perfctr_fail:
- for (i--; i >= 0; i--)
+ end = i;
+ for_each_set_bit(i, (unsigned long *)&cntr_mask, end)
release_perfctr_nmi(x86_pmu_event_addr(i));
return false;
@@ -233,9 +236,10 @@ static bool reserve_pmc_hardware(void)
static void release_pmc_hardware(void)
{
- int i, num_counters = get_possible_num_counters();
+ u64 cntr_mask = get_possible_counter_mask();
+ int i;
- for (i = 0; i < num_counters; i++) {
+ for_each_set_bit(i, (unsigned long *)&cntr_mask, X86_PMC_IDX_MAX) {
release_perfctr_nmi(x86_pmu_event_addr(i));
release_evntsel_nmi(x86_pmu_config_addr(i));
}
@@ -248,7 +252,8 @@ static void release_pmc_hardware(void) {}
#endif
-bool check_hw_exists(struct pmu *pmu, int num_counters, int num_counters_fixed)
+bool check_hw_exists(struct pmu *pmu, unsigned long *cntr_mask,
+ unsigned long *fixed_cntr_mask)
{
u64 val, val_fail = -1, val_new= ~0;
int i, reg, reg_fail = -1, ret = 0;
@@ -259,7 +264,7 @@ bool check_hw_exists(struct pmu *pmu, int num_counters, int num_counters_fixed)
* Check to see if the BIOS enabled any of the counters, if so
* complain and bail.
*/
- for (i = 0; i < num_counters; i++) {
+ for_each_set_bit(i, cntr_mask, X86_PMC_IDX_MAX) {
reg = x86_pmu_config_addr(i);
ret = rdmsrl_safe(reg, &val);
if (ret)
@@ -273,12 +278,12 @@ bool check_hw_exists(struct pmu *pmu, int num_counters, int num_counters_fixed)
}
}
- if (num_counters_fixed) {
+ if (*(u64 *)fixed_cntr_mask) {
reg = MSR_ARCH_PERFMON_FIXED_CTR_CTRL;
ret = rdmsrl_safe(reg, &val);
if (ret)
goto msr_fail;
- for (i = 0; i < num_counters_fixed; i++) {
+ for_each_set_bit(i, fixed_cntr_mask, X86_PMC_IDX_MAX) {
if (fixed_counter_disabled(i, pmu))
continue;
if (val & (0x03ULL << i*4)) {
@@ -679,7 +684,7 @@ void x86_pmu_disable_all(void)
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
int idx;
- for (idx = 0; idx < x86_pmu.num_counters; idx++) {
+ for_each_set_bit(idx, x86_pmu.cntr_mask, X86_PMC_IDX_MAX) {
struct hw_perf_event *hwc = &cpuc->events[idx]->hw;
u64 val;
@@ -736,7 +741,7 @@ void x86_pmu_enable_all(int added)
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
int idx;
- for (idx = 0; idx < x86_pmu.num_counters; idx++) {
+ for_each_set_bit(idx, x86_pmu.cntr_mask, X86_PMC_IDX_MAX) {
struct hw_perf_event *hwc = &cpuc->events[idx]->hw;
if (!test_bit(idx, cpuc->active_mask))
@@ -975,7 +980,6 @@ EXPORT_SYMBOL_GPL(perf_assign_events);
int x86_schedule_events(struct cpu_hw_events *cpuc, int n, int *assign)
{
- int num_counters = hybrid(cpuc->pmu, num_counters);
struct event_constraint *c;
struct perf_event *e;
int n0, i, wmin, wmax, unsched = 0;
@@ -1051,7 +1055,7 @@ int x86_schedule_events(struct cpu_hw_events *cpuc, int n, int *assign)
/* slow path */
if (i != n) {
- int gpmax = num_counters;
+ int gpmax = x86_pmu_max_num_counters(cpuc->pmu);
/*
* Do not allow scheduling of more than half the available
@@ -1072,7 +1076,7 @@ int x86_schedule_events(struct cpu_hw_events *cpuc, int n, int *assign)
* the extra Merge events needed by large increment events.
*/
if (x86_pmu.flags & PMU_FL_PAIR) {
- gpmax = num_counters - cpuc->n_pair;
+ gpmax -= cpuc->n_pair;
WARN_ON(gpmax <= 0);
}
@@ -1157,12 +1161,10 @@ static int collect_event(struct cpu_hw_events *cpuc, struct perf_event *event,
*/
static int collect_events(struct cpu_hw_events *cpuc, struct perf_event *leader, bool dogrp)
{
- int num_counters = hybrid(cpuc->pmu, num_counters);
- int num_counters_fixed = hybrid(cpuc->pmu, num_counters_fixed);
struct perf_event *event;
int n, max_count;
- max_count = num_counters + num_counters_fixed;
+ max_count = x86_pmu_num_counters(cpuc->pmu) + x86_pmu_num_counters_fixed(cpuc->pmu);
/* current number of events already accepted */
n = cpuc->n_events;
@@ -1522,13 +1524,13 @@ void perf_event_print_debug(void)
u64 pebs, debugctl;
int cpu = smp_processor_id();
struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu);
- int num_counters = hybrid(cpuc->pmu, num_counters);
- int num_counters_fixed = hybrid(cpuc->pmu, num_counters_fixed);
+ unsigned long *cntr_mask = hybrid(cpuc->pmu, cntr_mask);
+ unsigned long *fixed_cntr_mask = hybrid(cpuc->pmu, fixed_cntr_mask);
struct event_constraint *pebs_constraints = hybrid(cpuc->pmu, pebs_constraints);
unsigned long flags;
int idx;
- if (!num_counters)
+ if (!*(u64 *)cntr_mask)
return;
local_irq_save(flags);
@@ -1555,7 +1557,7 @@ void perf_event_print_debug(void)
}
pr_info("CPU#%d: active: %016llx\n", cpu, *(u64 *)cpuc->active_mask);
- for (idx = 0; idx < num_counters; idx++) {
+ for_each_set_bit(idx, cntr_mask, X86_PMC_IDX_MAX) {
rdmsrl(x86_pmu_config_addr(idx), pmc_ctrl);
rdmsrl(x86_pmu_event_addr(idx), pmc_count);
@@ -1568,7 +1570,7 @@ void perf_event_print_debug(void)
pr_info("CPU#%d: gen-PMC%d left: %016llx\n",
cpu, idx, prev_left);
}
- for (idx = 0; idx < num_counters_fixed; idx++) {
+ for_each_set_bit(idx, fixed_cntr_mask, X86_PMC_IDX_MAX) {
if (fixed_counter_disabled(idx, cpuc->pmu))
continue;
rdmsrl(MSR_ARCH_PERFMON_FIXED_CTR0 + idx, pmc_count);
@@ -1682,7 +1684,7 @@ int x86_pmu_handle_irq(struct pt_regs *regs)
*/
apic_write(APIC_LVTPC, APIC_DM_NMI);
- for (idx = 0; idx < x86_pmu.num_counters; idx++) {
+ for_each_set_bit(idx, x86_pmu.cntr_mask, X86_PMC_IDX_MAX) {
if (!test_bit(idx, cpuc->active_mask))
continue;
@@ -2038,18 +2040,15 @@ static void _x86_pmu_read(struct perf_event *event)
static_call(x86_pmu_update)(event);
}
-void x86_pmu_show_pmu_cap(int num_counters, int num_counters_fixed,
- u64 intel_ctrl)
+void x86_pmu_show_pmu_cap(struct pmu *pmu)
{
pr_info("... version: %d\n", x86_pmu.version);
pr_info("... bit width: %d\n", x86_pmu.cntval_bits);
- pr_info("... generic registers: %d\n", num_counters);
+ pr_info("... generic registers: %d\n", x86_pmu_num_counters(pmu));
pr_info("... value mask: %016Lx\n", x86_pmu.cntval_mask);
pr_info("... max period: %016Lx\n", x86_pmu.max_period);
- pr_info("... fixed-purpose events: %lu\n",
- hweight64((((1ULL << num_counters_fixed) - 1)
- << INTEL_PMC_IDX_FIXED) & intel_ctrl));
- pr_info("... event mask: %016Lx\n", intel_ctrl);
+ pr_info("... fixed-purpose events: %d\n", x86_pmu_num_counters_fixed(pmu));
+ pr_info("... event mask: %016Lx\n", hybrid(pmu, intel_ctrl));
}
static int __init init_hw_perf_events(void)
@@ -2086,7 +2085,7 @@ static int __init init_hw_perf_events(void)
pmu_check_apic();
/* sanity check that the hardware exists or is emulated */
- if (!check_hw_exists(&pmu, x86_pmu.num_counters, x86_pmu.num_counters_fixed))
+ if (!check_hw_exists(&pmu, x86_pmu.cntr_mask, x86_pmu.fixed_cntr_mask))
goto out_bad_pmu;
pr_cont("%s PMU driver.\n", x86_pmu.name);
@@ -2097,14 +2096,14 @@ static int __init init_hw_perf_events(void)
quirk->func();
if (!x86_pmu.intel_ctrl)
- x86_pmu.intel_ctrl = (1 << x86_pmu.num_counters) - 1;
+ x86_pmu.intel_ctrl = x86_pmu.cntr_mask64;
perf_events_lapic_init();
register_nmi_handler(NMI_LOCAL, perf_event_nmi_handler, 0, "PMI");
unconstrained = (struct event_constraint)
- __EVENT_CONSTRAINT(0, (1ULL << x86_pmu.num_counters) - 1,
- 0, x86_pmu.num_counters, 0, 0);
+ __EVENT_CONSTRAINT(0, x86_pmu.cntr_mask64,
+ 0, x86_pmu_num_counters(NULL), 0, 0);
x86_pmu_format_group.attrs = x86_pmu.format_attrs;
@@ -2113,11 +2112,8 @@ static int __init init_hw_perf_events(void)
pmu.attr_update = x86_pmu.attr_update;
- if (!is_hybrid()) {
- x86_pmu_show_pmu_cap(x86_pmu.num_counters,
- x86_pmu.num_counters_fixed,
- x86_pmu.intel_ctrl);
- }
+ if (!is_hybrid())
+ x86_pmu_show_pmu_cap(NULL);
if (!x86_pmu.read)
x86_pmu.read = _x86_pmu_read;
@@ -2481,7 +2477,7 @@ void perf_clear_dirty_counters(void)
for_each_set_bit(i, cpuc->dirty, X86_PMC_IDX_MAX) {
if (i >= INTEL_PMC_IDX_FIXED) {
/* Metrics and fake events don't have corresponding HW counters. */
- if ((i - INTEL_PMC_IDX_FIXED) >= hybrid(cpuc->pmu, num_counters_fixed))
+ if (!test_bit(i - INTEL_PMC_IDX_FIXED, hybrid(cpuc->pmu, fixed_cntr_mask)))
continue;
wrmsrl(MSR_ARCH_PERFMON_FIXED_CTR0 + (i - INTEL_PMC_IDX_FIXED), 0);
@@ -2986,8 +2982,8 @@ void perf_get_x86_pmu_capability(struct x86_pmu_capability *cap)
* base PMU holds the correct number of counters for P-cores.
*/
cap->version = x86_pmu.version;
- cap->num_counters_gp = x86_pmu.num_counters;
- cap->num_counters_fixed = x86_pmu.num_counters_fixed;
+ cap->num_counters_gp = x86_pmu_num_counters(NULL);
+ cap->num_counters_fixed = x86_pmu_num_counters_fixed(NULL);
cap->bit_width_gp = x86_pmu.cntval_bits;
cap->bit_width_fixed = x86_pmu.cntval_bits;
cap->events_mask = (unsigned int)x86_pmu.events_maskl;
diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
index 2175ca2fdba47..f25205d047e83 100644
--- a/arch/x86/events/intel/core.c
+++ b/arch/x86/events/intel/core.c
@@ -2874,23 +2874,23 @@ static void intel_pmu_reset(void)
{
struct debug_store *ds = __this_cpu_read(cpu_hw_events.ds);
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
- int num_counters_fixed = hybrid(cpuc->pmu, num_counters_fixed);
- int num_counters = hybrid(cpuc->pmu, num_counters);
+ unsigned long *cntr_mask = hybrid(cpuc->pmu, cntr_mask);
+ unsigned long *fixed_cntr_mask = hybrid(cpuc->pmu, fixed_cntr_mask);
unsigned long flags;
int idx;
- if (!num_counters)
+ if (!*(u64 *)cntr_mask)
return;
local_irq_save(flags);
pr_info("clearing PMU state on CPU#%d\n", smp_processor_id());
- for (idx = 0; idx < num_counters; idx++) {
+ for_each_set_bit(idx, cntr_mask, INTEL_PMC_MAX_GENERIC) {
wrmsrl_safe(x86_pmu_config_addr(idx), 0ull);
wrmsrl_safe(x86_pmu_event_addr(idx), 0ull);
}
- for (idx = 0; idx < num_counters_fixed; idx++) {
+ for_each_set_bit(idx, fixed_cntr_mask, INTEL_PMC_MAX_FIXED) {
if (fixed_counter_disabled(idx, cpuc->pmu))
continue;
wrmsrl_safe(MSR_ARCH_PERFMON_FIXED_CTR0 + idx, 0ull);
@@ -2940,8 +2940,7 @@ static void x86_pmu_handle_guest_pebs(struct pt_regs *regs,
!guest_pebs_idxs)
return;
- for_each_set_bit(bit, (unsigned long *)&guest_pebs_idxs,
- INTEL_PMC_IDX_FIXED + x86_pmu.num_counters_fixed) {
+ for_each_set_bit(bit, (unsigned long *)&guest_pebs_idxs, X86_PMC_IDX_MAX) {
event = cpuc->events[bit];
if (!event->attr.precise_ip)
continue;
@@ -4199,7 +4198,7 @@ static struct perf_guest_switch_msr *core_guest_get_msrs(int *nr, void *data)
struct perf_guest_switch_msr *arr = cpuc->guest_switch_msrs;
int idx;
- for (idx = 0; idx < x86_pmu.num_counters; idx++) {
+ for_each_set_bit(idx, x86_pmu.cntr_mask, X86_PMC_IDX_MAX) {
struct perf_event *event = cpuc->events[idx];
arr[idx].msr = x86_pmu_config_addr(idx);
@@ -4217,7 +4216,7 @@ static struct perf_guest_switch_msr *core_guest_get_msrs(int *nr, void *data)
arr[idx].guest &= ~ARCH_PERFMON_EVENTSEL_ENABLE;
}
- *nr = x86_pmu.num_counters;
+ *nr = x86_pmu_max_num_counters(cpuc->pmu);
return arr;
}
@@ -4232,7 +4231,7 @@ static void core_pmu_enable_all(int added)
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
int idx;
- for (idx = 0; idx < x86_pmu.num_counters; idx++) {
+ for_each_set_bit(idx, x86_pmu.cntr_mask, X86_PMC_IDX_MAX) {
struct hw_perf_event *hwc = &cpuc->events[idx]->hw;
if (!test_bit(idx, cpuc->active_mask) ||
@@ -4684,13 +4683,33 @@ static void flip_smm_bit(void *data)
}
}
-static void intel_pmu_check_num_counters(int *num_counters,
- int *num_counters_fixed,
- u64 *intel_ctrl, u64 fixed_mask);
+static void intel_pmu_check_counters_mask(u64 *cntr_mask,
+ u64 *fixed_cntr_mask,
+ u64 *intel_ctrl)
+{
+ unsigned int bit;
+
+ bit = fls64(*cntr_mask);
+ if (bit > INTEL_PMC_MAX_GENERIC) {
+ WARN(1, KERN_ERR "hw perf events %d > max(%d), clipping!",
+ bit, INTEL_PMC_MAX_GENERIC);
+ *cntr_mask &= GENMASK_ULL(INTEL_PMC_MAX_GENERIC - 1, 0);
+ }
+ *intel_ctrl = *cntr_mask;
+
+ bit = fls64(*fixed_cntr_mask);
+ if (bit > INTEL_PMC_MAX_FIXED) {
+ WARN(1, KERN_ERR "hw perf events fixed %d > max(%d), clipping!",
+ bit, INTEL_PMC_MAX_FIXED);
+ *fixed_cntr_mask &= GENMASK_ULL(INTEL_PMC_MAX_FIXED - 1, 0);
+ }
+
+ *intel_ctrl |= *fixed_cntr_mask << INTEL_PMC_IDX_FIXED;
+}
static void intel_pmu_check_event_constraints(struct event_constraint *event_constraints,
- int num_counters,
- int num_counters_fixed,
+ u64 cntr_mask,
+ u64 fixed_cntr_mask,
u64 intel_ctrl);
static void intel_pmu_check_extra_regs(struct extra_reg *extra_regs);
@@ -4713,11 +4732,10 @@ static void update_pmu_cap(struct x86_hybrid_pmu *pmu)
if (sub_bitmaps & ARCH_PERFMON_NUM_COUNTER_LEAF_BIT) {
cpuid_count(ARCH_PERFMON_EXT_LEAF, ARCH_PERFMON_NUM_COUNTER_LEAF,
&eax, &ebx, &ecx, &edx);
- pmu->num_counters = fls(eax);
- pmu->num_counters_fixed = fls(ebx);
+ pmu->cntr_mask64 = eax;
+ pmu->fixed_cntr_mask64 = ebx;
}
-
if (!intel_pmu_broken_perf_cap()) {
/* Perf Metric (Bit 15) and PEBS via PT (Bit 16) are hybrid enumeration */
rdmsrl(MSR_IA32_PERF_CAPABILITIES, pmu->intel_cap.capabilities);
@@ -4726,12 +4744,12 @@ static void update_pmu_cap(struct x86_hybrid_pmu *pmu)
static void intel_pmu_check_hybrid_pmus(struct x86_hybrid_pmu *pmu)
{
- intel_pmu_check_num_counters(&pmu->num_counters, &pmu->num_counters_fixed,
- &pmu->intel_ctrl, (1ULL << pmu->num_counters_fixed) - 1);
- pmu->pebs_events_mask = intel_pmu_pebs_mask(GENMASK_ULL(pmu->num_counters - 1, 0));
+ intel_pmu_check_counters_mask(&pmu->cntr_mask64, &pmu->fixed_cntr_mask64,
+ &pmu->intel_ctrl);
+ pmu->pebs_events_mask = intel_pmu_pebs_mask(pmu->cntr_mask64);
pmu->unconstrained = (struct event_constraint)
- __EVENT_CONSTRAINT(0, (1ULL << pmu->num_counters) - 1,
- 0, pmu->num_counters, 0, 0);
+ __EVENT_CONSTRAINT(0, pmu->cntr_mask64,
+ 0, x86_pmu_num_counters(&pmu->pmu), 0, 0);
if (pmu->intel_cap.perf_metrics)
pmu->intel_ctrl |= 1ULL << GLOBAL_CTRL_EN_PERF_METRICS;
@@ -4744,8 +4762,8 @@ static void intel_pmu_check_hybrid_pmus(struct x86_hybrid_pmu *pmu)
pmu->pmu.capabilities &= ~PERF_PMU_CAP_AUX_OUTPUT;
intel_pmu_check_event_constraints(pmu->event_constraints,
- pmu->num_counters,
- pmu->num_counters_fixed,
+ pmu->cntr_mask64,
+ pmu->fixed_cntr_mask64,
pmu->intel_ctrl);
intel_pmu_check_extra_regs(pmu->extra_regs);
@@ -4806,7 +4824,7 @@ static bool init_hybrid_pmu(int cpu)
intel_pmu_check_hybrid_pmus(pmu);
- if (!check_hw_exists(&pmu->pmu, pmu->num_counters, pmu->num_counters_fixed))
+ if (!check_hw_exists(&pmu->pmu, pmu->cntr_mask, pmu->fixed_cntr_mask))
return false;
pr_info("%s PMU driver: ", pmu->name);
@@ -4816,8 +4834,7 @@ static bool init_hybrid_pmu(int cpu)
pr_cont("\n");
- x86_pmu_show_pmu_cap(pmu->num_counters, pmu->num_counters_fixed,
- pmu->intel_ctrl);
+ x86_pmu_show_pmu_cap(&pmu->pmu);
end:
cpumask_set_cpu(cpu, &pmu->supported_cpus);
@@ -5955,29 +5972,9 @@ static const struct attribute_group *hybrid_attr_update[] = {
static struct attribute *empty_attrs;
-static void intel_pmu_check_num_counters(int *num_counters,
- int *num_counters_fixed,
- u64 *intel_ctrl, u64 fixed_mask)
-{
- if (*num_counters > INTEL_PMC_MAX_GENERIC) {
- WARN(1, KERN_ERR "hw perf events %d > max(%d), clipping!",
- *num_counters, INTEL_PMC_MAX_GENERIC);
- *num_counters = INTEL_PMC_MAX_GENERIC;
- }
- *intel_ctrl = (1ULL << *num_counters) - 1;
-
- if (*num_counters_fixed > INTEL_PMC_MAX_FIXED) {
- WARN(1, KERN_ERR "hw perf events fixed %d > max(%d), clipping!",
- *num_counters_fixed, INTEL_PMC_MAX_FIXED);
- *num_counters_fixed = INTEL_PMC_MAX_FIXED;
- }
-
- *intel_ctrl |= fixed_mask << INTEL_PMC_IDX_FIXED;
-}
-
static void intel_pmu_check_event_constraints(struct event_constraint *event_constraints,
- int num_counters,
- int num_counters_fixed,
+ u64 cntr_mask,
+ u64 fixed_cntr_mask,
u64 intel_ctrl)
{
struct event_constraint *c;
@@ -6014,10 +6011,9 @@ static void intel_pmu_check_event_constraints(struct event_constraint *event_con
* generic counters
*/
if (!use_fixed_pseudo_encoding(c->code))
- c->idxmsk64 |= (1ULL << num_counters) - 1;
+ c->idxmsk64 |= cntr_mask;
}
- c->idxmsk64 &=
- ~(~0ULL << (INTEL_PMC_IDX_FIXED + num_counters_fixed));
+ c->idxmsk64 &= cntr_mask | (fixed_cntr_mask << INTEL_PMC_IDX_FIXED);
c->weight = hweight64(c->idxmsk64);
}
}
@@ -6068,12 +6064,12 @@ static __always_inline int intel_pmu_init_hybrid(enum hybrid_pmu_type pmus)
pmu->pmu_type = intel_hybrid_pmu_type_map[bit].id;
pmu->name = intel_hybrid_pmu_type_map[bit].name;
- pmu->num_counters = x86_pmu.num_counters;
- pmu->num_counters_fixed = x86_pmu.num_counters_fixed;
- pmu->pebs_events_mask = intel_pmu_pebs_mask(GENMASK_ULL(pmu->num_counters - 1, 0));
+ pmu->cntr_mask64 = x86_pmu.cntr_mask64;
+ pmu->fixed_cntr_mask64 = x86_pmu.fixed_cntr_mask64;
+ pmu->pebs_events_mask = intel_pmu_pebs_mask(pmu->cntr_mask64);
pmu->unconstrained = (struct event_constraint)
- __EVENT_CONSTRAINT(0, (1ULL << pmu->num_counters) - 1,
- 0, pmu->num_counters, 0, 0);
+ __EVENT_CONSTRAINT(0, pmu->cntr_mask64,
+ 0, x86_pmu_num_counters(&pmu->pmu), 0, 0);
pmu->intel_cap.capabilities = x86_pmu.intel_cap.capabilities;
if (pmu->pmu_type & hybrid_small) {
@@ -6186,14 +6182,14 @@ __init int intel_pmu_init(void)
x86_pmu = intel_pmu;
x86_pmu.version = version;
- x86_pmu.num_counters = eax.split.num_counters;
+ x86_pmu.cntr_mask64 = GENMASK_ULL(eax.split.num_counters - 1, 0);
x86_pmu.cntval_bits = eax.split.bit_width;
x86_pmu.cntval_mask = (1ULL << eax.split.bit_width) - 1;
x86_pmu.events_maskl = ebx.full;
x86_pmu.events_mask_len = eax.split.mask_length;
- x86_pmu.pebs_events_mask = intel_pmu_pebs_mask(GENMASK_ULL(x86_pmu.num_counters - 1, 0));
+ x86_pmu.pebs_events_mask = intel_pmu_pebs_mask(x86_pmu.cntr_mask64);
x86_pmu.pebs_capable = PEBS_COUNTER_MASK;
/*
@@ -6203,12 +6199,10 @@ __init int intel_pmu_init(void)
if (version > 1 && version < 5) {
int assume = 3 * !boot_cpu_has(X86_FEATURE_HYPERVISOR);
- x86_pmu.num_counters_fixed =
- max((int)edx.split.num_counters_fixed, assume);
-
- fixed_mask = (1L << x86_pmu.num_counters_fixed) - 1;
+ x86_pmu.fixed_cntr_mask64 =
+ GENMASK_ULL(max((int)edx.split.num_counters_fixed, assume) - 1, 0);
} else if (version >= 5)
- x86_pmu.num_counters_fixed = fls(fixed_mask);
+ x86_pmu.fixed_cntr_mask64 = fixed_mask;
if (boot_cpu_has(X86_FEATURE_PDCM)) {
u64 capabilities;
@@ -6807,11 +6801,13 @@ __init int intel_pmu_init(void)
pmu = &x86_pmu.hybrid_pmu[X86_HYBRID_PMU_CORE_IDX];
intel_pmu_init_glc(&pmu->pmu);
if (cpu_feature_enabled(X86_FEATURE_HYBRID_CPU)) {
- pmu->num_counters = x86_pmu.num_counters + 2;
- pmu->num_counters_fixed = x86_pmu.num_counters_fixed + 1;
+ pmu->cntr_mask64 <<= 2;
+ pmu->cntr_mask64 |= 0x3;
+ pmu->fixed_cntr_mask64 <<= 1;
+ pmu->fixed_cntr_mask64 |= 0x1;
} else {
- pmu->num_counters = x86_pmu.num_counters;
- pmu->num_counters_fixed = x86_pmu.num_counters_fixed;
+ pmu->cntr_mask64 = x86_pmu.cntr_mask64;
+ pmu->fixed_cntr_mask64 = x86_pmu.fixed_cntr_mask64;
}
/*
@@ -6821,15 +6817,16 @@ __init int intel_pmu_init(void)
* mistakenly add extra counters for P-cores. Correct the number of
* counters here.
*/
- if ((pmu->num_counters > 8) || (pmu->num_counters_fixed > 4)) {
- pmu->num_counters = x86_pmu.num_counters;
- pmu->num_counters_fixed = x86_pmu.num_counters_fixed;
+ if ((x86_pmu_num_counters(&pmu->pmu) > 8) || (x86_pmu_num_counters_fixed(&pmu->pmu) > 4)) {
+ pmu->cntr_mask64 = x86_pmu.cntr_mask64;
+ pmu->fixed_cntr_mask64 = x86_pmu.fixed_cntr_mask64;
}
- pmu->pebs_events_mask = intel_pmu_pebs_mask(GENMASK_ULL(pmu->num_counters - 1, 0));
+ pmu->pebs_events_mask = intel_pmu_pebs_mask(pmu->cntr_mask64);
pmu->unconstrained = (struct event_constraint)
- __EVENT_CONSTRAINT(0, (1ULL << pmu->num_counters) - 1,
- 0, pmu->num_counters, 0, 0);
+ __EVENT_CONSTRAINT(0, pmu->cntr_mask64,
+ 0, x86_pmu_num_counters(&pmu->pmu), 0, 0);
+
pmu->extra_regs = intel_glc_extra_regs;
/* Initialize Atom core specific PerfMon capabilities.*/
@@ -6896,9 +6893,9 @@ __init int intel_pmu_init(void)
* The constraints may be cut according to the CPUID enumeration
* by inserting the EVENT_CONSTRAINT_END.
*/
- if (x86_pmu.num_counters_fixed > INTEL_PMC_MAX_FIXED)
- x86_pmu.num_counters_fixed = INTEL_PMC_MAX_FIXED;
- intel_v5_gen_event_constraints[x86_pmu.num_counters_fixed].weight = -1;
+ if (fls64(x86_pmu.fixed_cntr_mask64) > INTEL_PMC_MAX_FIXED)
+ x86_pmu.fixed_cntr_mask64 &= GENMASK_ULL(INTEL_PMC_MAX_FIXED - 1, 0);
+ intel_v5_gen_event_constraints[fls64(x86_pmu.fixed_cntr_mask64)].weight = -1;
x86_pmu.event_constraints = intel_v5_gen_event_constraints;
pr_cont("generic architected perfmon, ");
name = "generic_arch_v5+";
@@ -6925,18 +6922,17 @@ __init int intel_pmu_init(void)
x86_pmu.attr_update = hybrid_attr_update;
}
- intel_pmu_check_num_counters(&x86_pmu.num_counters,
- &x86_pmu.num_counters_fixed,
- &x86_pmu.intel_ctrl,
- (u64)fixed_mask);
+ intel_pmu_check_counters_mask(&x86_pmu.cntr_mask64,
+ &x86_pmu.fixed_cntr_mask64,
+ &x86_pmu.intel_ctrl);
/* AnyThread may be deprecated on arch perfmon v5 or later */
if (x86_pmu.intel_cap.anythread_deprecated)
x86_pmu.format_attrs = intel_arch_formats_attr;
intel_pmu_check_event_constraints(x86_pmu.event_constraints,
- x86_pmu.num_counters,
- x86_pmu.num_counters_fixed,
+ x86_pmu.cntr_mask64,
+ x86_pmu.fixed_cntr_mask64,
x86_pmu.intel_ctrl);
/*
* Access LBR MSR may cause #GP under certain circumstances.
diff --git a/arch/x86/events/intel/ds.c b/arch/x86/events/intel/ds.c
index 87d3feb9f8fe8..9212053f6f1d6 100644
--- a/arch/x86/events/intel/ds.c
+++ b/arch/x86/events/intel/ds.c
@@ -1138,7 +1138,6 @@ static inline void pebs_update_threshold(struct cpu_hw_events *cpuc)
{
struct debug_store *ds = cpuc->ds;
int max_pebs_events = intel_pmu_max_num_pebs(cpuc->pmu);
- int num_counters_fixed = hybrid(cpuc->pmu, num_counters_fixed);
u64 threshold;
int reserved;
@@ -1146,7 +1145,7 @@ static inline void pebs_update_threshold(struct cpu_hw_events *cpuc)
return;
if (x86_pmu.flags & PMU_FL_PEBS_ALL)
- reserved = max_pebs_events + num_counters_fixed;
+ reserved = max_pebs_events + x86_pmu_max_num_counters_fixed(cpuc->pmu);
else
reserved = max_pebs_events;
@@ -2176,8 +2175,8 @@ static void intel_pmu_drain_pebs_nhm(struct pt_regs *iregs, struct perf_sample_d
mask = x86_pmu.pebs_events_mask;
size = max_pebs_events;
if (x86_pmu.flags & PMU_FL_PEBS_ALL) {
- mask |= ((1ULL << x86_pmu.num_counters_fixed) - 1) << INTEL_PMC_IDX_FIXED;
- size = INTEL_PMC_IDX_FIXED + x86_pmu.num_counters_fixed;
+ mask |= x86_pmu.fixed_cntr_mask64 << INTEL_PMC_IDX_FIXED;
+ size = INTEL_PMC_IDX_FIXED + x86_pmu_max_num_counters_fixed(NULL);
}
if (unlikely(base >= top)) {
@@ -2273,11 +2272,10 @@ static void intel_pmu_drain_pebs_icl(struct pt_regs *iregs, struct perf_sample_d
{
short counts[INTEL_PMC_IDX_FIXED + MAX_FIXED_PEBS_EVENTS] = {};
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
- int num_counters_fixed = hybrid(cpuc->pmu, num_counters_fixed);
struct debug_store *ds = cpuc->ds;
struct perf_event *event;
void *base, *at, *top;
- int bit, size;
+ int bit;
u64 mask;
if (!x86_pmu.pebs_active)
@@ -2289,11 +2287,10 @@ static void intel_pmu_drain_pebs_icl(struct pt_regs *iregs, struct perf_sample_d
ds->pebs_index = ds->pebs_buffer_base;
mask = hybrid(cpuc->pmu, pebs_events_mask) |
- (((1ULL << num_counters_fixed) - 1) << INTEL_PMC_IDX_FIXED);
- size = INTEL_PMC_IDX_FIXED + num_counters_fixed;
+ (hybrid(cpuc->pmu, fixed_cntr_mask64) << INTEL_PMC_IDX_FIXED);
if (unlikely(base >= top)) {
- intel_pmu_pebs_event_update_no_drain(cpuc, size);
+ intel_pmu_pebs_event_update_no_drain(cpuc, X86_PMC_IDX_MAX);
return;
}
@@ -2303,11 +2300,11 @@ static void intel_pmu_drain_pebs_icl(struct pt_regs *iregs, struct perf_sample_d
pebs_status = get_pebs_status(at) & cpuc->pebs_enabled;
pebs_status &= mask;
- for_each_set_bit(bit, (unsigned long *)&pebs_status, size)
+ for_each_set_bit(bit, (unsigned long *)&pebs_status, X86_PMC_IDX_MAX)
counts[bit]++;
}
- for_each_set_bit(bit, (unsigned long *)&mask, size) {
+ for_each_set_bit(bit, (unsigned long *)&mask, X86_PMC_IDX_MAX) {
if (counts[bit] == 0)
continue;
diff --git a/arch/x86/events/intel/knc.c b/arch/x86/events/intel/knc.c
index 618001c208e81..034a1f6a457c6 100644
--- a/arch/x86/events/intel/knc.c
+++ b/arch/x86/events/intel/knc.c
@@ -303,7 +303,7 @@ static const struct x86_pmu knc_pmu __initconst = {
.apic = 1,
.max_period = (1ULL << 39) - 1,
.version = 0,
- .num_counters = 2,
+ .cntr_mask64 = 0x3,
.cntval_bits = 40,
.cntval_mask = (1ULL << 40) - 1,
.get_event_constraints = x86_get_event_constraints,
diff --git a/arch/x86/events/intel/p4.c b/arch/x86/events/intel/p4.c
index 35936188db01b..844bc4fc4724d 100644
--- a/arch/x86/events/intel/p4.c
+++ b/arch/x86/events/intel/p4.c
@@ -919,7 +919,7 @@ static void p4_pmu_disable_all(void)
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
int idx;
- for (idx = 0; idx < x86_pmu.num_counters; idx++) {
+ for_each_set_bit(idx, x86_pmu.cntr_mask, X86_PMC_IDX_MAX) {
struct perf_event *event = cpuc->events[idx];
if (!test_bit(idx, cpuc->active_mask))
continue;
@@ -998,7 +998,7 @@ static void p4_pmu_enable_all(int added)
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
int idx;
- for (idx = 0; idx < x86_pmu.num_counters; idx++) {
+ for_each_set_bit(idx, x86_pmu.cntr_mask, X86_PMC_IDX_MAX) {
struct perf_event *event = cpuc->events[idx];
if (!test_bit(idx, cpuc->active_mask))
continue;
@@ -1040,7 +1040,7 @@ static int p4_pmu_handle_irq(struct pt_regs *regs)
cpuc = this_cpu_ptr(&cpu_hw_events);
- for (idx = 0; idx < x86_pmu.num_counters; idx++) {
+ for_each_set_bit(idx, x86_pmu.cntr_mask, X86_PMC_IDX_MAX) {
int overflow;
if (!test_bit(idx, cpuc->active_mask)) {
@@ -1353,7 +1353,7 @@ static __initconst const struct x86_pmu p4_pmu = {
* though leave it restricted at moment assuming
* HT is on
*/
- .num_counters = ARCH_P4_MAX_CCCR,
+ .cntr_mask64 = GENMASK_ULL(ARCH_P4_MAX_CCCR - 1, 0),
.apic = 1,
.cntval_bits = ARCH_P4_CNTRVAL_BITS,
.cntval_mask = ARCH_P4_CNTRVAL_MASK,
@@ -1395,7 +1395,7 @@ __init int p4_pmu_init(void)
*
* Solve this by zero'ing out the registers to mimic a reset.
*/
- for (i = 0; i < x86_pmu.num_counters; i++) {
+ for_each_set_bit(i, x86_pmu.cntr_mask, X86_PMC_IDX_MAX) {
reg = x86_pmu_config_addr(i);
wrmsrl_safe(reg, 0ULL);
}
diff --git a/arch/x86/events/intel/p6.c b/arch/x86/events/intel/p6.c
index 408879b0c0d4e..a6cffb4f4ef52 100644
--- a/arch/x86/events/intel/p6.c
+++ b/arch/x86/events/intel/p6.c
@@ -214,7 +214,7 @@ static __initconst const struct x86_pmu p6_pmu = {
.apic = 1,
.max_period = (1ULL << 31) - 1,
.version = 0,
- .num_counters = 2,
+ .cntr_mask64 = 0x3,
/*
* Events have 40 bits implemented. However they are designed such
* that bits [32-39] are sign extensions of bit 31. As such the
diff --git a/arch/x86/events/perf_event.h b/arch/x86/events/perf_event.h
index a7ba2868018ca..745c174fc8809 100644
--- a/arch/x86/events/perf_event.h
+++ b/arch/x86/events/perf_event.h
@@ -685,8 +685,14 @@ struct x86_hybrid_pmu {
union perf_capabilities intel_cap;
u64 intel_ctrl;
u64 pebs_events_mask;
- int num_counters;
- int num_counters_fixed;
+ union {
+ u64 cntr_mask64;
+ unsigned long cntr_mask[BITS_TO_LONGS(X86_PMC_IDX_MAX)];
+ };
+ union {
+ u64 fixed_cntr_mask64;
+ unsigned long fixed_cntr_mask[BITS_TO_LONGS(X86_PMC_IDX_MAX)];
+ };
struct event_constraint unconstrained;
u64 hw_cache_event_ids
@@ -774,8 +780,14 @@ struct x86_pmu {
int (*rdpmc_index)(int index);
u64 (*event_map)(int);
int max_events;
- int num_counters;
- int num_counters_fixed;
+ union {
+ u64 cntr_mask64;
+ unsigned long cntr_mask[BITS_TO_LONGS(X86_PMC_IDX_MAX)];
+ };
+ union {
+ u64 fixed_cntr_mask64;
+ unsigned long fixed_cntr_mask[BITS_TO_LONGS(X86_PMC_IDX_MAX)];
+ };
int cntval_bits;
u64 cntval_mask;
union {
@@ -1125,8 +1137,8 @@ static inline int x86_pmu_rdpmc_index(int index)
return x86_pmu.rdpmc_index ? x86_pmu.rdpmc_index(index) : index;
}
-bool check_hw_exists(struct pmu *pmu, int num_counters,
- int num_counters_fixed);
+bool check_hw_exists(struct pmu *pmu, unsigned long *cntr_mask,
+ unsigned long *fixed_cntr_mask);
int x86_add_exclusive(unsigned int what);
@@ -1197,8 +1209,27 @@ void x86_pmu_enable_event(struct perf_event *event);
int x86_pmu_handle_irq(struct pt_regs *regs);
-void x86_pmu_show_pmu_cap(int num_counters, int num_counters_fixed,
- u64 intel_ctrl);
+void x86_pmu_show_pmu_cap(struct pmu *pmu);
+
+static inline int x86_pmu_num_counters(struct pmu *pmu)
+{
+ return hweight64(hybrid(pmu, cntr_mask64));
+}
+
+static inline int x86_pmu_max_num_counters(struct pmu *pmu)
+{
+ return fls64(hybrid(pmu, cntr_mask64));
+}
+
+static inline int x86_pmu_num_counters_fixed(struct pmu *pmu)
+{
+ return hweight64(hybrid(pmu, fixed_cntr_mask64));
+}
+
+static inline int x86_pmu_max_num_counters_fixed(struct pmu *pmu)
+{
+ return fls64(hybrid(pmu, fixed_cntr_mask64));
+}
extern struct event_constraint emptyconstraint;
diff --git a/arch/x86/events/zhaoxin/core.c b/arch/x86/events/zhaoxin/core.c
index 3e9acdaeed1ec..2fd9b0cf9a5e5 100644
--- a/arch/x86/events/zhaoxin/core.c
+++ b/arch/x86/events/zhaoxin/core.c
@@ -530,13 +530,13 @@ __init int zhaoxin_pmu_init(void)
pr_info("Version check pass!\n");
x86_pmu.version = version;
- x86_pmu.num_counters = eax.split.num_counters;
+ x86_pmu.cntr_mask64 = GENMASK_ULL(eax.split.num_counters - 1, 0);
x86_pmu.cntval_bits = eax.split.bit_width;
x86_pmu.cntval_mask = (1ULL << eax.split.bit_width) - 1;
x86_pmu.events_maskl = ebx.full;
x86_pmu.events_mask_len = eax.split.mask_length;
- x86_pmu.num_counters_fixed = edx.split.num_counters_fixed;
+ x86_pmu.fixed_cntr_mask64 = GENMASK_ULL(edx.split.num_counters_fixed - 1, 0);
x86_add_quirk(zhaoxin_arch_events_quirk);
switch (boot_cpu_data.x86) {
@@ -604,13 +604,13 @@ __init int zhaoxin_pmu_init(void)
return -ENODEV;
}
- x86_pmu.intel_ctrl = (1 << (x86_pmu.num_counters)) - 1;
- x86_pmu.intel_ctrl |= ((1LL << x86_pmu.num_counters_fixed)-1) << INTEL_PMC_IDX_FIXED;
+ x86_pmu.intel_ctrl = x86_pmu.cntr_mask64;
+ x86_pmu.intel_ctrl |= x86_pmu.fixed_cntr_mask64 << INTEL_PMC_IDX_FIXED;
if (x86_pmu.event_constraints) {
for_each_event_constraint(c, x86_pmu.event_constraints) {
- c->idxmsk64 |= (1ULL << x86_pmu.num_counters) - 1;
- c->weight += x86_pmu.num_counters;
+ c->idxmsk64 |= x86_pmu.cntr_mask64;
+ c->weight += x86_pmu_num_counters(NULL);
}
}
--
2.43.0
next prev parent reply other threads:[~2024-08-12 16:23 UTC|newest]
Thread overview: 290+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-12 16:00 [PATCH 6.10 000/263] 6.10.5-rc1 review Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 001/263] drm/amd/display: Refactor function dm_dp_mst_is_port_support_mode() Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 002/263] locking/pvqspinlock: Correct the type of "old" variable in pv_kick_node() Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 003/263] perf/x86/intel/cstate: Add Arrowlake support Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 004/263] perf/x86/intel/cstate: Add Lunarlake support Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 005/263] perf/x86/intel/cstate: Add pkg C2 residency counter for Sierra Forest Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 006/263] platform/x86: intel-vbtn: Protect ACPI notify handler against recursion Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 007/263] irqchip/mbigen: Fix mbigen node address layout Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 008/263] platform/x86/intel/ifs: Initialize union ifs_status to zero Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 009/263] jump_label: Fix the fix, brown paper bags galore Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 010/263] perf/x86/amd: Use try_cmpxchg() in events/amd/{un,}core.c Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 011/263] perf/x86/intel: Support the PEBS event mask Greg Kroah-Hartman
2024-08-12 16:00 ` Greg Kroah-Hartman [this message]
2024-08-12 16:00 ` [PATCH 6.10 013/263] perf/x86: Fix smp_processor_id()-in-preemptible warnings Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 014/263] selftests: ksft: Fix finished() helper exit code on skipped tests Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 015/263] x86/mm: Fix pti_clone_pgtable() alignment assumption Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 016/263] x86/mm: Fix pti_clone_entry_text() for i386 Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 017/263] smb: client: handle lack of FSCTL_GET_REPARSE_POINT support Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 018/263] power: supply: rt5033: Bring back i2c_set_clientdata Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 019/263] sctp: Fix null-ptr-deref in reuseport_add_sock() Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 020/263] net: pse-pd: tps23881: Fix the device ID check Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 021/263] gve: Fix use of netif_carrier_ok() Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 022/263] virtio-net: unbreak vq resizing when coalescing is not negotiated Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 023/263] net: usb: qmi_wwan: fix memory leak for not ip packets Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 024/263] net: bridge: mcast: wait for previous gc cycles when removing port Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 025/263] net: linkwatch: use system_unbound_wq Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 026/263] net: dsa: microchip: Fix Wake-on-LAN check to not return an error Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 027/263] ice: Fix reset handler Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 028/263] Bluetooth: l2cap: always unlock channel in l2cap_conless_channel() Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 029/263] Bluetooth: hci_sync: avoid dup filtering when passive scanning with adv monitor Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 030/263] net/smc: add the max value of fallback reason count Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 031/263] net: dsa: bcm_sf2: Fix a possible memory leak in bcm_sf2_mdio_register() Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 032/263] bnxt_en : Fix memory out-of-bounds in bnxt_fill_hw_rss_tbl() Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 033/263] idpf: fix memory leaks and crashes while performing a soft reset Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 034/263] idpf: fix UAFs when destroying the queues Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 035/263] l2tp: fix lockdep splat Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 036/263] net: bcmgenet: Properly overlay PHY and MAC Wake-on-LAN capabilities Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 037/263] net: fec: Stop PPS on driver remove Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 038/263] net: pse-pd: tps23881: include missing bitfield.h header Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 039/263] net: dsa: microchip: disable EEE for KSZ8567/KSZ9567/KSZ9896/KSZ9897 Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 040/263] regmap: kunit: Fix memory leaks in gen_regmap() and gen_raw_regmap() Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 041/263] gpio: prevent potential speculation leaks in gpio_device_get_desc() Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 042/263] hwmon: corsair-psu: add USB id of HX1200i Series 2023 psu Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 043/263] Revert "rcu-tasks: Fix synchronize_rcu_tasks() VS zap_pid_ns_processes()" Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 044/263] platform/chrome: cros_ec_lpc: Add a new quirk for ACPI id Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 045/263] rcutorture: Fix rcu_torture_fwd_cb_cr() data race Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 046/263] md: do not delete safemode_timer in mddev_suspend Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 047/263] md: change the return value type of md_write_start to void Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 048/263] md/raid5: avoid BUG_ON() while continue reshape after reassembling Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 049/263] debugobjects: Annotate racy debug variables Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 050/263] nvme: apple: fix device reference counting Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 051/263] block: change rq_integrity_vec to respect the iterator Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 052/263] rcu: Fix rcu_barrier() VS post CPUHP_TEARDOWN_CPU invocation Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 053/263] clocksource/drivers/sh_cmt: Address race condition for clock events Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 054/263] ACPI: battery: create alarm sysfs attribute atomically Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 055/263] ACPI: SBS: manage alarm sysfs attribute through psy core Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 056/263] cpufreq: amd-pstate: Allow users to write default EPP string Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 057/263] cpufreq: amd-pstate: auto-load pstate driver by default Greg Kroah-Hartman
2024-08-12 16:00 ` [PATCH 6.10 058/263] soc: qcom: icc-bwmon: Allow for interrupts to be shared across instances Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 059/263] xen: privcmd: Switch from mutex to spinlock for irqfds Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 060/263] ACPI: resource: Skip IRQ override on Asus Vivobook Pro N6506MU Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 061/263] ACPI: resource: Skip IRQ override on Asus Vivobook Pro N6506MJ Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 062/263] thermal: intel: hfi: Give HFI instances package scope Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 063/263] wifi: nl80211: disallow setting special AP channel widths Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 064/263] wifi: ath12k: fix race due to setting ATH12K_FLAG_EXT_IRQ_ENABLED too early Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 065/263] wifi: rtlwifi: handle return value of usb init TX/RX Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 066/263] wifi: ath12k: fix memory leak in ath12k_dp_rx_peer_frag_setup() Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 067/263] net/mlx5e: SHAMPO, Fix invalid WQ linked list unlink Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 068/263] selftests/bpf: Fix send_signal test with nested CONFIG_PARAVIRT Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 069/263] wifi: rtw89: pci: fix RX tag race condition resulting in wrong RX length Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 070/263] af_unix: Dont retry after unix_state_lock_nested() in unix_stream_connect() Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 071/263] PCI: Add Edimax Vendor ID to pci_ids.h Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 072/263] wifi: mac80211: fix NULL dereference at band check in starting tx ba session Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 073/263] udf: prevent integer overflow in udf_bitmap_free_blocks() Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 074/263] bpf: add missing check_func_arg_reg_off() to prevent out-of-bounds memory accesses Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 075/263] wifi: nl80211: dont give key data to userspace Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 076/263] can: mcp251xfd: tef: prepare to workaround broken TEF FIFO tail index erratum Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 077/263] can: mcp251xfd: tef: update workaround for erratum DS80000789E 6 of mcp2518fd Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 078/263] net: stmmac: qcom-ethqos: enable SGMII loopback during DMA reset on sa8775p-ride-r3 Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 079/263] mlxsw: pci: Lock configuration space of upstream bridge during reset Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 080/263] btrfs: do not clear page dirty inside extent_write_locked_range() Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 081/263] btrfs: do not BUG_ON() when freeing tree block after error Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 082/263] btrfs: reduce nesting for extent processing at btrfs_lookup_extent_info() Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 083/263] btrfs: fix data race when accessing the last_trans field of a root Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 084/263] btrfs: fix bitmap leak when loading free space cache on duplicate entry Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 085/263] Bluetooth: btnxpuart: Shutdown timer and prevent rearming when driver unloading Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 086/263] drm/xe/preempt_fence: enlarge the fence critical section Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 087/263] drm/amd/display: Handle HPD_IRQ for internal link Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 088/263] drm/amd/display: Add delay to improve LTTPR UHBR interop Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 089/263] drm/amdgpu: fix potential resource leak warning Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 090/263] drm/amdgpu/pm: Fix the param type of set_power_profile_mode Greg Kroah-Hartman
2024-08-19 7:49 ` Jiri Slaby
2024-08-19 7:53 ` Jiri Slaby
2024-08-19 20:12 ` Deucher, Alexander
2024-08-20 4:39 ` Jiri Slaby
2024-08-20 21:45 ` Deucher, Alexander
2024-08-12 16:01 ` [PATCH 6.10 091/263] drm/amd/amdkfd: Fix a resource leak in svm_range_validate_and_map() Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 092/263] drm/xe/xe_guc_submit: Fix exec queue stop race condition Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 093/263] drm/amdgpu/pm: Fix the null pointer dereference for smu7 Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 094/263] drm/amdgpu: Fix the null pointer dereference to ras_manager Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 095/263] drm/amdgpu/pm: Fix the null pointer dereference in apply_state_adjust_rules Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 096/263] drm/admgpu: fix dereferencing null pointer context Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 097/263] drm/amdgpu: Add lock around VF RLCG interface Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 098/263] drm/amd/pm: Fix the null pointer dereference for vega10_hwmgr Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 099/263] drm/amd/display: Add null checks for stream and plane before dereferencing Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 100/263] media: amphion: Remove lock in s_ctrl callback Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 101/263] drm/amd/display: Add NULL check for afb before dereferencing in amdgpu_dm_plane_handle_cursor_update Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 102/263] drm/amd/display: Wake DMCUB before sending a command for replay feature Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 103/263] drm/amd/display: reduce ODM slice count to initial new dc state only when needed Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 104/263] drm/amd/display: Dont refer to dc_sink in is_dsc_need_re_compute Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 105/263] drm/amd/display: remove dpp pipes on failure to update pipe params Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 106/263] drm/amd/display: Add null checker before passing variables Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 107/263] media: i2c: ov5647: replacing of_node_put with __free(device_node) Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 108/263] media: uvcvideo: Ignore empty TS packets Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 109/263] media: uvcvideo: Fix the bandwdith quirk on USB 3.x Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 110/263] drm/amd/display: Fix NULL pointer dereference for DTN log in DCN401 Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 111/263] media: xc2028: avoid use-after-free in load_firmware_cb() Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 112/263] ext4: fix uninitialized variable in ext4_inlinedir_to_tree Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 113/263] jbd2: avoid memleak in jbd2_journal_write_metadata_buffer Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 114/263] drm/amd/display: Fix null pointer deref in dcn20_resource.c Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 115/263] s390/sclp: Prevent release of buffer in I/O Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 116/263] ext4: sanity check for NULL pointer after ext4_force_shutdown Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 117/263] SUNRPC: Fix a race to wake a sync task Greg Kroah-Hartman
2024-08-12 16:01 ` [PATCH 6.10 118/263] mm, slub: do not call do_slab_free for kfence object Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 119/263] profiling: remove profile=sleep support Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 120/263] clocksource: Fix brown-bag boolean thinko in cs_watchdog_read() Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 121/263] scsi: Revert "scsi: sd: Do not repeat the starting disk message" Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 122/263] scsi: mpt3sas: Avoid IOMMU page faults on REPORT ZONES Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 123/263] media: ipu-bridge: fix ipu6 Kconfig dependencies Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 124/263] media: intel/ipu6: select AUXILIARY_BUS in Kconfig Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 125/263] irqchip/meson-gpio: Convert meson_gpio_irq_controller::lock to raw_spinlock_t Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 126/263] irqchip/loongarch-cpu: Fix return value of lpic_gsi_to_irq() Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 127/263] sched/cputime: Fix mul_u64_u64_div_u64() precision for cputime Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 128/263] net: drop bad gso csum_start and offset in virtio_net_hdr Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 129/263] arm64: cputype: Add Cortex-X3 definitions Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 130/263] arm64: cputype: Add Cortex-A720 definitions Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 131/263] arm64: cputype: Add Cortex-X925 definitions Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 132/263] arm64: errata: Unify speculative SSBS errata logic Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 133/263] arm64: errata: Expand speculative SSBS workaround Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 134/263] arm64: cputype: Add Cortex-X1C definitions Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 135/263] arm64: cputype: Add Cortex-A725 definitions Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 136/263] arm64: errata: Expand speculative SSBS workaround (again) Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 137/263] nfsd: dont set SVC_SOCK_ANONYMOUS when creating nfsd sockets Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 138/263] i2c: smbus: Improve handling of stuck alerts Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 139/263] ASoC: codecs: wcd938x-sdw: Correct Soundwire ports mask Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 140/263] ASoC: codecs: wcd939x-sdw: " Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 141/263] ASoC: codecs: wsa881x: " Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 142/263] ASoC: codecs: wsa883x: parse port-mapping information Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 143/263] ASoC: codecs: wsa883x: Correct Soundwire ports mask Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 144/263] ASoC: codecs: wsa884x: parse port-mapping information Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 145/263] ASoC: codecs: wsa884x: Correct Soundwire ports mask Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 146/263] ASoC: sti: add missing probe entry for player and reader Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 147/263] spi: spidev: Add missing spi_device_id for bh2228fv Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 148/263] ASoC: SOF: Remove libraries from topology lookups Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 149/263] i2c: smbus: Send alert notifications to all devices if source not found Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 150/263] bpf: kprobe: remove unused declaring of bpf_kprobe_override Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 151/263] kprobes: Fix to check symbol prefixes correctly Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 152/263] ASoC: cs-amp-lib: Fix NULL pointer crash if efi.get_variable is NULL Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 153/263] i2c: qcom-geni: Add missing clk_disable_unprepare in geni_i2c_runtime_resume Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 154/263] ASoC: cs35l56: Revert support for dual-ownership of ASP registers Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 155/263] ASoC: cs35l56: Handle OTP read latency over SoundWire Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 156/263] drm/atomic: allow no-op FB_ID updates for async flips Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 157/263] i2c: qcom-geni: Add missing geni_icc_disable in geni_i2c_runtime_resume Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 158/263] drm/i915: Allow evicting to use the requested placement Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 159/263] drm/i915: Attempt to get pages without eviction first Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 160/263] drm/amd/display: Replace dm_execute_dmub_cmd with dc_wake_and_execute_dmub_cmd Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 161/263] spi: spi-fsl-lpspi: Fix scldiv calculation Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 162/263] ALSA: usb-audio: Re-add ScratchAmp quirk entries Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 163/263] drm/xe/rtp: Fix off-by-one when processing rules Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 164/263] drm/xe: Use dma_fence_chain_free in chain fence unused as a sync Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 165/263] drm/xe/hwmon: Fix PL1 disable flow in xe_hwmon_power_max_write Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 166/263] drm/xe: Minor cleanup in LRC handling Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 167/263] drm/xe: Take ref to VM in delayed snapshot Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 168/263] ASoC: meson: axg-fifo: fix irq scheduling issue with PREEMPT_RT Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 169/263] cifs: cifs_inval_name_dfs_link_error: correct the check for fullpath Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 170/263] module: warn about excessively long module waits Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 171/263] module: make waiting for a concurrent module loader interruptible Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 172/263] drm/i915/gem: Fix Virtual Memory mapping boundaries calculation Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 173/263] drm/amd/display: Skip Recompute DSC Params if no Stream on Link Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 174/263] drm/amdgpu: Forward soft recovery errors to userspace Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 175/263] drm/i915/gem: Adjust vma offset for framebuffer mmap offset Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 176/263] drm/client: fix null pointer dereference in drm_client_modeset_probe Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 177/263] drm/i915/display: correct dual pps handling for MTL_PCH+ Greg Kroah-Hartman
2024-08-12 16:02 ` [PATCH 6.10 178/263] drm/test: fix the gem shmem test to map the sg table Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 179/263] io_uring/net: ensure expanded bundle recv gets marked for cleanup Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 180/263] io_uring/net: ensure expanded bundle send " Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 181/263] io_uring/net: dont pick multiple buffers for non-bundle send Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 182/263] ALSA: line6: Fix racy access to midibuf Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 183/263] ALSA: hda: Add HP MP9 G4 Retail System AMS to force connect list Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 184/263] ALSA: hda/realtek: Add Framework Laptop 13 (Intel Core Ultra) to quirks Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 185/263] ALSA: hda/hdmi: Yet more pin fix for HP EliteDesk 800 G4 Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 186/263] usb: vhci-hcd: Do not drop references before new references are gained Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 187/263] USB: serial: debug: do not echo input by default Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 188/263] usb: typec: fsa4480: Check if the chip is really there Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 189/263] usb: gadget: core: Check for unset descriptor Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 190/263] usb: gadget: midi2: Fix the response for FB info with block 0xff Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 191/263] usb: gadget: u_serial: Set start_delayed during suspend Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 192/263] usb: gadget: f_fs: restore ffs_func_disable() functionality Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 193/263] usb: gadget: u_audio: Check return codes from usb_ep_enable and config_ep_by_speed Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 194/263] scsi: mpi3mr: Avoid IOMMU page faults on REPORT ZONES Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 195/263] scsi: ufs: core: Fix deadlock during RTC update Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 196/263] scsi: ufs: core: Do not set link to OFF state while waking up from hibernation Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 197/263] scsi: ufs: core: Fix hba->last_dme_cmd_tstamp timestamp updating logic Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 198/263] tick/broadcast: Move per CPU pointer access into the atomic section Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 199/263] media: v4l: Fix missing tabular column hint for Y14P format Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 200/263] vhost-vdpa: switch to use vmf_insert_pfn() in the fault handler Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 201/263] spmi: pmic-arb: add missing newline in dev_err format strings Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 202/263] ntp: Clamp maxerror and esterror to operating range Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 203/263] driver core: Fix uevent_show() vs driver detach race Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 204/263] arm64: dts: ti: k3-am62-verdin-dahlia: Keep CTRL_SLEEP_MOCI# regulator on Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 205/263] tracefs: Fix inode allocation Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 206/263] tracefs: Use generic inode RCU for synchronizing freeing Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 207/263] ntp: Safeguard against time_constant overflow Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 208/263] timekeeping: Fix bogus clock_was_set() invocation in do_adjtimex() Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 209/263] serial: core: check uartclk for zero to avoid divide by zero Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 210/263] serial: sc16is7xx: fix TX fifo corruption Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 211/263] serial: sc16is7xx: fix invalid FIFO access with special register set Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 212/263] tty: vt: conmakehash: cope with abs_srctree no longer in env Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 213/263] memcg: protect concurrent access to mem_cgroup_idr Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 214/263] parisc: fix unaligned accesses in BPF Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 215/263] parisc: fix a possible DMA corruption Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 216/263] ASoC: amd: yc: Add quirk entry for OMEN by HP Gaming Laptop 16-n0xxx Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 217/263] spmi: pmic-arb: Pass the correct of_node to irq_domain_add_tree Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 218/263] kcov: properly check for softirq context Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 219/263] irqchip/xilinx: Fix shift out of bounds Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 220/263] irqchip/riscv-aplic: Retrigger MSI interrupt on source configuration Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 221/263] genirq/irqdesc: Honor caller provided affinity in alloc_desc() Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 222/263] LoongArch: Enable general EFI poweroff method Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 223/263] power: supply: qcom_battmgr: return EAGAIN when firmware service is not up Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 224/263] power: supply: axp288_charger: Fix constant_charge_voltage writes Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 225/263] power: supply: axp288_charger: Round constant_charge_voltage writes down Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 226/263] tracing: Have format file honor EVENT_FILE_FL_FREED Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 227/263] tracing: Fix overflow in get_free_elt() Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 228/263] padata: Fix possible divide-by-0 panic in padata_mt_helper() Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 229/263] smb3: fix setting SecurityFlags when encryption is required Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 230/263] eventfs: Dont return NULL in eventfs_create_dir() Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 231/263] eventfs: Use SRCU for freeing eventfs_inodes Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 232/263] selftests: mm: add s390 to ARCH check Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 233/263] mm: list_lru: fix UAF for memory cgroup Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 234/263] net/tcp: Disable TCP-AO static key after RCU grace period Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 235/263] btrfs: avoid using fixed char array size for tree names Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 236/263] x86/paravirt: Fix incorrect virt spinlock setting on bare metal Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 237/263] x86/mtrr: Check if fixed MTRRs exist before saving them Greg Kroah-Hartman
2024-08-12 16:03 ` [PATCH 6.10 238/263] sched/smt: Introduce sched_smt_present_inc/dec() helper Greg Kroah-Hartman
2024-08-12 16:04 ` [PATCH 6.10 239/263] sched/smt: Fix unbalance sched_smt_present dec/inc Greg Kroah-Hartman
2024-08-12 16:04 ` [PATCH 6.10 240/263] sched/core: Introduce sched_set_rq_on/offline() helper Greg Kroah-Hartman
2024-08-12 16:04 ` [PATCH 6.10 241/263] sched/core: Fix unbalance set_rq_online/offline() in sched_cpu_deactivate() Greg Kroah-Hartman
2024-08-12 16:04 ` [PATCH 6.10 242/263] drm/bridge: analogix_dp: properly handle zero sized AUX transactions Greg Kroah-Hartman
2024-08-12 16:04 ` [PATCH 6.10 243/263] drm/dp_mst: Skip CSN if topology probing is not done yet Greg Kroah-Hartman
2024-08-12 16:04 ` [PATCH 6.10 244/263] drm/lima: Mark simple_ondemand governor as softdep Greg Kroah-Hartman
2024-08-12 16:04 ` [PATCH 6.10 245/263] drm/mgag200: Set DDC timeout in milliseconds Greg Kroah-Hartman
2024-08-12 16:04 ` [PATCH 6.10 246/263] drm/mgag200: Bind I2C lifetime to DRM device Greg Kroah-Hartman
2024-08-12 16:04 ` [PATCH 6.10 247/263] drm/radeon: Remove __counted_by from StateArray.states[] Greg Kroah-Hartman
2024-08-12 16:04 ` [PATCH 6.10 248/263] mptcp: fully established after ADD_ADDR echo on MPJ Greg Kroah-Hartman
2024-08-12 16:04 ` [PATCH 6.10 249/263] mptcp: pm: deny endp with signal + subflow + port Greg Kroah-Hartman
2024-08-12 16:04 ` [PATCH 6.10 250/263] block: use the right type for stub rq_integrity_vec() Greg Kroah-Hartman
2024-08-12 16:04 ` [PATCH 6.10 251/263] Revert "drm/amd/display: Handle HPD_IRQ for internal link" Greg Kroah-Hartman
2024-08-12 16:04 ` [PATCH 6.10 252/263] Revert "drm/amd/display: Add NULL check for afb before dereferencing in amdgpu_dm_plane_handle_cursor_update" Greg Kroah-Hartman
2024-08-12 16:04 ` [PATCH 6.10 253/263] btrfs: fix corruption after buffer fault in during direct IO append write Greg Kroah-Hartman
2024-08-12 16:04 ` [PATCH 6.10 254/263] idpf: fix memleak in vport interrupt configuration Greg Kroah-Hartman
2024-08-12 16:04 ` [PATCH 6.10 255/263] drm/amd/display: Add null check in resource_log_pipe_topology_update Greg Kroah-Hartman
2024-08-12 16:04 ` [PATCH 6.10 256/263] drm/amd/display: Change ASSR disable sequence Greg Kroah-Hartman
2024-08-12 16:04 ` [PATCH 6.10 257/263] drm/amd/display: Defer handling mst up request in resume Greg Kroah-Hartman
2024-08-13 12:56 ` Kevin Holm
2024-08-13 14:21 ` Greg Kroah-Hartman
2024-08-13 14:41 ` Lin, Wayne
2024-08-13 15:26 ` Greg Kroah-Hartman
2024-08-13 19:54 ` Kevin Holm
2024-08-14 7:43 ` Kevin Holm
2024-08-14 11:39 ` Greg Kroah-Hartman
2024-08-15 8:20 ` Greg Kroah-Hartman
2024-08-13 15:05 ` Kevin Holm
2024-08-12 16:04 ` [PATCH 6.10 258/263] mptcp: pm: reduce indentation blocks Greg Kroah-Hartman
2024-08-12 16:04 ` [PATCH 6.10 259/263] mptcp: pm: dont try to create sf if alloc failed Greg Kroah-Hartman
2024-08-12 16:04 ` [PATCH 6.10 260/263] mptcp: pm: do not ignore subflow if signal flag is also set Greg Kroah-Hartman
2024-08-12 16:04 ` [PATCH 6.10 261/263] selftests: mptcp: join: ability to invert ADD_ADDR check Greg Kroah-Hartman
2024-08-12 16:04 ` [PATCH 6.10 262/263] selftests: mptcp: join: test both signal & subflow Greg Kroah-Hartman
2024-08-12 16:04 ` [PATCH 6.10 263/263] btrfs: fix double inode unlock for direct IO sync writes Greg Kroah-Hartman
2024-08-12 20:54 ` [PATCH 6.10 000/263] 6.10.5-rc1 review Pavel Machek
2024-08-13 7:09 ` Naresh Kamboju
2024-08-13 11:32 ` Peter Schneider
2024-08-13 12:23 ` Mark Brown
2024-08-13 17:33 ` Florian Fainelli
2024-08-13 18:41 ` Jon Hunter
2024-08-13 19:34 ` Ron Economos
2024-08-15 14:21 ` Guenter Roeck
2024-08-16 8:38 ` Greg Kroah-Hartman
2024-08-16 8:42 ` Greg Kroah-Hartman
2024-08-16 14:43 ` Guenter Roeck
2024-08-16 22:13 ` Nathan Chancellor
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=20240812160147.009227137@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=ak@linux.intel.com \
--cc=irogers@google.com \
--cc=kan.liang@linux.intel.com \
--cc=patches@lists.linux.dev \
--cc=peterz@infradead.org \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
/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