arm64/mpam: resctrl: Add helpers for init and destroy schemata list
hulk inclusion category: feature feature: ARM MPAM support bugzilla: 48265 CVE: NA -------------------------------- Initialize schemata list when mount resctrl sysfs and destroy it when umount, each list node contains the value updated by schemata (in resctrl sysfs) row. Partial code is borrowed from 250656171d95 ("x86/resctrl: Stop using Lx CODE/DATA resources"), as it illustrates: Now that CDP enable/disable is global, and the closid offset correction is based on the configuration being applied, we are using different hw_closid slots in the ctrl array for CODE/DATA schema. This lets us merge them using the same Lx resource twice for CDP's CODE/DATA schema. This keeps the illusion of separate caches in the resctrl code. When CDP is enabled for a cache, create two schema generating the names and setting the configuration type. We can now remove the initialisation of the illusionary hw_resources: 'cdp_capable' just requires setting a flag, resctrl knows what to do from there. Link: http://www.linux-arm.org/git?p=linux-jm.git;a=commit;h=250656171d95dea079cc661098a0984e7237aa25Signed-off-by: NWang ShaoBo <bobo.shaobowang@huawei.com> Reviewed-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: NCheng Jian <cj.chengjian@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录