diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-20 10:11:04 -1000 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-20 10:11:04 -1000 |
| commit | f3b035ba59944ca48a2d5efce40a0c43e52fa97c (patch) | |
| tree | 11f3f253f8cfa0976a9bb050d2c551b39e78f6f2 /arch/x86/kernel/cpu | |
| parent | 06ad059fbda2f78f6488fcec57d3424c00d9b20f (diff) | |
| parent | 2c10b3fa5bdf61e344bc522e6c2e00d870ce7ab8 (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 'arch/x86/kernel/cpu')
| -rw-r--r-- | arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 6 | ||||
| -rw-r--r-- | arch/x86/kernel/cpu/resctrl/intel_aet.c | 34 |
2 files changed, 40 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/resctrl/ctrlmondata.c b/arch/x86/kernel/cpu/resctrl/ctrlmondata.c index e74f1ed54b86..62044489b052 100644 --- a/arch/x86/kernel/cpu/resctrl/ctrlmondata.c +++ b/arch/x86/kernel/cpu/resctrl/ctrlmondata.c @@ -16,9 +16,15 @@ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include <linux/cpu.h> +#include <linux/math.h> #include "internal.h" +u32 resctrl_arch_preconvert_bw(const struct rdt_resource *r, u32 val) +{ + return roundup(val, (unsigned long)r->membw.bw_gran); +} + int resctrl_arch_update_one(struct rdt_resource *r, struct rdt_ctrl_domain *d, u32 closid, enum resctrl_conf_type t, u32 cfg_val) { diff --git a/arch/x86/kernel/cpu/resctrl/intel_aet.c b/arch/x86/kernel/cpu/resctrl/intel_aet.c index c22c3cf5167d..66cd8c2c7a51 100644 --- a/arch/x86/kernel/cpu/resctrl/intel_aet.c +++ b/arch/x86/kernel/cpu/resctrl/intel_aet.c @@ -125,9 +125,43 @@ static struct event_group perf_0x26557651 = { } }; +/* + * Link: https://github.com/intel/Intel-PMT/blob/main/xml/DMR/OOBMSM/RMID-ENERGY/dmr_aggregator.xml + */ +static struct event_group energy_0x47903099 = { + .pfname = "energy", + .guid = 0x47903099, + .num_rmid = 256, + .mmio_size = XML_MMIO_SIZE(256, 2, 3), + .num_events = 2, + .evts = { + EVT(PMT_EVENT_ENERGY, 0, 18), + EVT(PMT_EVENT_ACTIVITY, 1, 18), + } +}; + +/* + * Link: https://github.com/intel/Intel-PMT/blob/main/xml/DMR/OOBMSM/RMID-PERF/dmr_aggregator.xml + */ +static struct event_group perf_0x1415910a = { + .pfname = "perf", + .guid = 0x1415910a, + .num_rmid = 256, + .mmio_size = XML_MMIO_SIZE(256, 4, 3), + .num_events = 4, + .evts = { + EVT(PMT_EVENT_UNHALTED_REF_CYCLES, 0, 0), + EVT(PMT_EVENT_UNHALTED_CORE_CYCLES, 1, 0), + EVT(PMT_EVENT_INST_RETIRED, 2, 0), + EVT(PMT_EVENT_PCNT, 3, 0), + } +}; + static struct event_group *known_event_groups[] = { &energy_0x26696143, + &energy_0x47903099, &perf_0x26557651, + &perf_0x1415910a, }; #define for_each_event_group(_peg) \ |
