diff options
| author | Jiri Kosina <jkosina@suse.com> | 2025-07-31 22:36:25 +0200 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.com> | 2025-07-31 22:36:25 +0200 |
| commit | e9ef810dfee7a2227da9d423aecb0ced35faddbe (patch) | |
| tree | 52befbbbeacbd9340f90884dee840be3f492d3e1 /fs/resctrl/monitor.c | |
| parent | selftests/hid: add a test case for the recent syzbot underflow (diff) | |
| parent | HID: amd_sfh: Enable operating mode (diff) | |
| download | linux-e9ef810dfee7a2227da9d423aecb0ced35faddbe.tar.gz linux-e9ef810dfee7a2227da9d423aecb0ced35faddbe.zip | |
Merge branch 'for-6.17/amd-sfh' into for-linus
- add support for operating modes (Basavaraj Natikar)
Diffstat (limited to 'fs/resctrl/monitor.c')
| -rw-r--r-- | fs/resctrl/monitor.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/resctrl/monitor.c b/fs/resctrl/monitor.c index bde2801289d3..f5637855c3ac 100644 --- a/fs/resctrl/monitor.c +++ b/fs/resctrl/monitor.c @@ -361,6 +361,7 @@ static int __mon_event_count(u32 closid, u32 rmid, struct rmid_read *rr) { int cpu = smp_processor_id(); struct rdt_mon_domain *d; + struct cacheinfo *ci; struct mbm_state *m; int err, ret; u64 tval = 0; @@ -388,7 +389,8 @@ static int __mon_event_count(u32 closid, u32 rmid, struct rmid_read *rr) } /* Summing domains that share a cache, must be on a CPU for that cache. */ - if (!cpumask_test_cpu(cpu, &rr->ci->shared_cpu_map)) + ci = get_cpu_cacheinfo_level(cpu, RESCTRL_L3_CACHE); + if (!ci || ci->id != rr->ci_id) return -EINVAL; /* @@ -400,7 +402,7 @@ static int __mon_event_count(u32 closid, u32 rmid, struct rmid_read *rr) */ ret = -EINVAL; list_for_each_entry(d, &rr->r->mon_domains, hdr.list) { - if (d->ci->id != rr->ci->id) + if (d->ci_id != rr->ci_id) continue; err = resctrl_arch_rmid_read(rr->r, d, closid, rmid, rr->evtid, &tval, rr->arch_mon_ctx); |
