summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-10-20 10:11:04 -1000
committerLinus Torvalds <torvalds@linux-foundation.org>2026-10-20 10:11:04 -1000
commitf3b035ba59944ca48a2d5efce40a0c43e52fa97c (patch)
tree11f3f253f8cfa0976a9bb050d2c551b39e78f6f2 /include
parent06ad059fbda2f78f6488fcec57d3424c00d9b20f (diff)
parent2c10b3fa5bdf61e344bc522e6c2e00d870ce7ab8 (diff)
Merge tag 'x86_cache_for_v7.4_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 resource control updates from Borislav Petkov: - Push down into arch code the rounding of bandwidth control user values due to the different ways ARM and x86 report MBA - Fix task reporting for the default group for systems which support only bandwidth monitoring, aka Haswell vintage computing - The usual fixlets and improvements * tag 'x86_cache_for_v7.4_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: fs/resctrl: Ensure default group reports tasks on monitor-only systems x86,fs/resctrl: Add event group descriptions for Intel Diamond Rapids x86/resctrl: Update documented unit for the "activity" event fs/resctrl: Simplify pseudo_lock_measure_trigger() fs/resctrl: Avoid extra call to strlen() in schemata_list_add() fs/resctrl: Factor MBA parse-time conversion to be per-arch arm_mpam: resctrl: Add pass-through resctrl_arch_preconvert_bw() x86,fs/resctrl: Add resctrl_arch_preconvert_bw()
Diffstat (limited to 'include')
-rw-r--r--include/linux/resctrl.h19
-rw-r--r--include/linux/resctrl_types.h2
2 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h
index dd09c2ce9a0f..10dfdca7f4bf 100644
--- a/include/linux/resctrl.h
+++ b/include/linux/resctrl.h
@@ -505,6 +505,25 @@ bool resctrl_arch_mbm_cntr_assign_enabled(struct rdt_resource *r);
*/
int resctrl_arch_mbm_cntr_assign_set(struct rdt_resource *r, bool enable);
+/**
+ * resctrl_arch_preconvert_bw() - Prepare bandwidth control value for arch use.
+ * @r: Resource whose schema was written.
+ * @val: Bandwidth control value written to the schemata file by userspace.
+ *
+ * Convert the user provided bandwidth control value to an appropriate form for
+ * consumption by the hardware driver for resource @r. Converted value is stored
+ * in rdt_ctrl_domain::staged_config[] for later consumption by
+ * resctrl_arch_update_domains(). Is not called when MBA software controller is
+ * enabled.
+ *
+ * Architectures for which this pre-conversion hook is not useful should supply
+ * an implementation of this function that just returns @val unmodified.
+ *
+ * Return:
+ * The converted value.
+ */
+u32 resctrl_arch_preconvert_bw(const struct rdt_resource *r, u32 val);
+
/*
* Update the ctrl_val and apply this config right now.
* Must be called on one of the domain's CPUs.
diff --git a/include/linux/resctrl_types.h b/include/linux/resctrl_types.h
index a5f56faa18d2..e2e2cf3d9ff6 100644
--- a/include/linux/resctrl_types.h
+++ b/include/linux/resctrl_types.h
@@ -60,6 +60,8 @@ enum resctrl_event_id {
PMT_EVENT_AUTO_C6_RES,
PMT_EVENT_UNHALTED_REF_CYCLES,
PMT_EVENT_UOPS_RETIRED,
+ PMT_EVENT_INST_RETIRED,
+ PMT_EVENT_PCNT,
/* Must be the last */
QOS_NUM_EVENTS,