James Morse 6ce1560d35 x86/resctrl: Switch over to the resctrl mbps_val list
Updates to resctrl's software controller follow the same path as
other configuration updates, but they don't modify the hardware state.
rdtgroup_schemata_write() uses parse_line() and the resource's
parse_ctrlval() function to stage the configuration.
resctrl_arch_update_domains() then updates the mbps_val[] array
instead, and resctrl_arch_update_domains() skips the rdt_ctrl_update()
call that would update hardware.

This complicates the interface between resctrl's filesystem parts
and architecture specific code. It should be possible for mba_sc
to be completely implemented by the filesystem parts of resctrl. This
would allow it to work on a second architecture with no additional code.
resctrl_arch_update_domains() using the mbps_val[] array prevents this.

Change parse_bw() to write the configuration value directly to the
mbps_val[] array in the domain structure. Change rdtgroup_schemata_write()
to skip the call to resctrl_arch_update_domains(), meaning all the
mba_sc specific code in resctrl_arch_update_domains() can be removed.
On the read-side, show_doms() and update_mba_bw() are changed to read
the mbps_val[] array from the domain structure. With this,
resctrl_arch_get_config() no longer needs to consider mba_sc resources.

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-10-james.morse@arm.com
2022-09-22 17:34:08 +02:00
..
2022-03-15 10:32:40 +01:00
2021-11-02 22:22:13 -07:00
2022-02-25 09:36:05 +01:00
2022-04-19 17:14:09 -07:00
2022-08-05 09:41:12 -07:00
2022-07-01 11:11:34 +02:00
2022-06-27 10:34:00 +02:00
2022-04-07 08:27:51 -07:00
2022-08-02 15:21:18 -07:00
2022-06-20 06:22:04 -04:00
2022-03-15 10:32:36 +01:00
2021-12-01 00:06:43 +01:00
2022-04-14 14:09:43 +02:00
2022-05-19 19:30:31 +02:00
2022-08-25 15:54:03 +02:00
2022-04-14 14:09:43 +02:00
2022-02-25 09:36:05 +01:00
2021-10-25 23:02:36 -04:00
2022-04-14 14:09:43 +02:00