Commit dd781a91 authored by Wang ShaoBo's avatar Wang ShaoBo Committed by Yang Yingliang
Browse files

arm64/mpam: resctrl: Add helpers for init and destroy schemata list

hulk inclusion
category: feature
bugzilla: 34278
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 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=250656171d95dea079cc661098a0984e7237aa25


Signed-off-by: default avatarWang ShaoBo <bobo.shaobowang@huawei.com>
Reviewed-by: default avatarXiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: default avatarCheng Jian <cj.chengjian@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarCheng Jian <cj.chengjian@huawei.com>
parent 34a7d3f7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment