selftests/resctrl: Extend CPU vendor detection
authorShaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Wed, 23 Mar 2022 08:09:27 +0000 (17:09 +0900)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 25 Apr 2022 22:57:50 +0000 (16:57 -0600)
commit6220f69e72a534838cffd84dce6afd777777be03
tree13ef22c7ac5ffe8f4d764544a28f388cacc84331
parent170d1c23f2a356932259034f73d579d0bab857d6
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>
tools/testing/selftests/resctrl/cat_test.c
tools/testing/selftests/resctrl/resctrl.h
tools/testing/selftests/resctrl/resctrl_tests.c
tools/testing/selftests/resctrl/resctrlfs.c