提交 3e04af4e 编写于 作者: W Wang ShaoBo 提交者: Zheng Zengkai

arm64/mpam: Add helper for getting mpam sysprops

hulk inclusion
category: feature
feature: ARM MPAM support
bugzilla: 48265
CVE: NA

--------------------------------

Now mpam sysprops have been probed, maximum support of partid
and pmg should be exported to resctrl.

For MPAM, Processing elements (PEs) issue memory-system requests,
PEs must implement the MPAMn_ELx registers and their behaviors to
generate the PARTID and PMG fields of memory-system requests.

For resctrl, partid and pmg should be used to combined into a unique
rmid for labeling each group, and partid for determining the maximum
number of ctrl groups.
Signed-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>
上级 2cf7960c
...@@ -666,3 +666,15 @@ void __init mpam_discovery_failed(void) ...@@ -666,3 +666,15 @@ void __init mpam_discovery_failed(void)
} }
mutex_unlock(&mpam_devices_lock); mutex_unlock(&mpam_devices_lock);
} }
u16 mpam_sysprops_num_partid(void)
{
/* At least one partid for system width */
return mpam_sysprops.max_partid + 1;
}
u16 mpam_sysprops_num_pmg(void)
{
/* At least one pmg for system width */
return mpam_sysprops.max_pmg + 1;
}
...@@ -48,4 +48,7 @@ static inline void mpam_clear_feature(enum mpam_device_features feat, ...@@ -48,4 +48,7 @@ static inline void mpam_clear_feature(enum mpam_device_features feat,
#define MPAM_ARCHITECTURE_V1 0x10 #define MPAM_ARCHITECTURE_V1 0x10
u16 mpam_sysprops_num_partid(void);
u16 mpam_sysprops_num_pmg(void);
#endif #endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册