summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/resctrl/resctrlfs.c
diff options
context:
space:
mode:
authorShaopeng Tan <tan.shaopeng@jp.fujitsu.com>2022-03-23 17:09:27 +0900
committerShuah Khan <skhan@linuxfoundation.org>2022-04-25 16:57:50 -0600
commit6220f69e72a534838cffd84dce6afd777777be03 (patch)
tree13ef22c7ac5ffe8f4d764544a28f388cacc84331 /tools/testing/selftests/resctrl/resctrlfs.c
parent170d1c23f2a356932259034f73d579d0bab857d6 (diff)
selftests/resctrl: Extend CPU vendor detection
Currently, the resctrl_tests only has a function to detect AMD vendor. Since when the Intel Sub-NUMA Clustering feature is enabled, Intel CMT and MBM counters may not be accurate, the resctrl_tests also need a function to detect Intel vendor. And in the future, resctrl_tests will need a function to detect different vendors, such as Arm. Extend the function to detect Intel vendor as well. Also, this function can be easily extended to detect other vendors. Signed-off-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com> Reviewed-by: Reinette Chatre <reinette.chatre@intel.com> Reviewed-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/resctrl/resctrlfs.c')
-rw-r--r--tools/testing/selftests/resctrl/resctrlfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/resctrl/resctrlfs.c b/tools/testing/selftests/resctrl/resctrlfs.c
index 5f5a166ade60..6f543e470ad4 100644
--- a/tools/testing/selftests/resctrl/resctrlfs.c
+++ b/tools/testing/selftests/resctrl/resctrlfs.c
@@ -106,7 +106,7 @@ int get_resource_id(int cpu_no, int *resource_id)
char phys_pkg_path[1024];
FILE *fp;
- if (is_amd)
+ if (get_vendor() == ARCH_AMD)
sprintf(phys_pkg_path, "%s%d/cache/index3/id",
PHYS_ID_PATH, cpu_no);
else