1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/arch/x86/kernel/cpu/resctrl
James Morse f7b1843eca x86/resctrl: Make resctrl_arch_rmid_read() return values in bytes
resctrl_arch_rmid_read() returns a value in chunks, as read from the
hardware. This needs scaling to bytes by mon_scale, as provided by
the architecture code.

Now that resctrl_arch_rmid_read() performs the overflow and corrections
itself, it may as well return a value in bytes directly. This allows
the accesses to the architecture specific 'hw' structure to be removed.

Move the mon_scale conversion into resctrl_arch_rmid_read().
mbm_bw_count() is updated to calculate bandwidth from bytes.

Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Jamie Iles <quic_jiles@quicinc.com>
Reviewed-by: Shaopeng Tan <tan.shaopeng@fujitsu.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Tested-by: Xin Hao <xhao@linux.alibaba.com>
Tested-by: Shaopeng Tan <tan.shaopeng@fujitsu.com>
Tested-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20220902154829.30399-22-james.morse@arm.com
2022-09-23 14:25:05 +02:00
..
core.c x86/resctrl: Add per-rmid arch private storage for overflow and chunks 2022-09-22 17:46:09 +02:00
ctrlmondata.c x86/resctrl: Make resctrl_arch_rmid_read() return values in bytes 2022-09-23 14:25:05 +02:00
internal.h x86/resctrl: Make resctrl_arch_rmid_read() return values in bytes 2022-09-23 14:25:05 +02:00
Makefile x86/resctrl: Avoid confusion over the new X86_RESCTRL config 2019-02-02 10:34:52 +01:00
monitor.c x86/resctrl: Make resctrl_arch_rmid_read() return values in bytes 2022-09-23 14:25:05 +02:00
pseudo_lock.c x86/resctrl: Kill off alloc_enabled 2022-09-22 14:34:33 +02:00
pseudo_lock_event.h x86/resctrl: Rename and move rdt files to a separate directory 2018-11-22 20:16:18 +01:00
rdtgroup.c x86/resctrl: Add resctrl_rmid_realloc_limit to abstract x86's boot_cpu_data 2022-09-23 14:24:16 +02:00