]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86,fs/resctrl: Use struct rdt_domain_hdr when reading counters
authorTony Luck <tony.luck@intel.com>
Wed, 17 Dec 2025 17:20:54 +0000 (09:20 -0800)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 5 Jan 2026 10:08:58 +0000 (11:08 +0100)
commit6b10cf7b6ea857cdf9570e21c077a05803f60575
tree95ad3095328cfe7eb891d645bac90038c2eeb1d8
parentad5c2ff75e0c53d2588dfc10eb87458e759b6bbe
x86,fs/resctrl: Use struct rdt_domain_hdr when reading counters

Convert the whole call sequence from mon_event_read() to resctrl_arch_rmid_read() to
pass resource independent struct rdt_domain_hdr instead of an L3 specific domain
structure to prepare for monitoring events in other resources.

This additional layer of indirection obscures which aspects of event counting depend
on a valid domain. Event initialization, support for assignable counters, and normal
event counting implicitly depend on a valid domain while summing of domains does not.
Split summing domains from the core event counting handling to make their respective
dependencies obvious.

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Link: https://lore.kernel.org/20251217172121.12030-1-tony.luck@intel.com
arch/x86/kernel/cpu/resctrl/monitor.c
fs/resctrl/ctrlmondata.c
fs/resctrl/internal.h
fs/resctrl/monitor.c
include/linux/resctrl.h