selftests/resctrl: Fix non-contiguous CBM for AMD
authorBabu Moger <babu.moger@amd.com>
Tue, 11 Jun 2024 22:18:30 +0000 (17:18 -0500)
committerShuah Khan <skhan@linuxfoundation.org>
Wed, 26 Jun 2024 19:22:34 +0000 (13:22 -0600)
commit48236960c06d32370bfa6f2cc408e786873262c8
treef572921be7ea1b9bf5d0737e84f7828dae5e9b56
parented3994ac847e0d6605f248e7f6776b1d4f445f4b
selftests/resctrl: Fix non-contiguous CBM for AMD

The non-contiguous CBM test fails on AMD with:
Starting L3_NONCONT_CAT test ...
Mounting resctrl to "/sys/fs/resctrl"
CPUID output doesn't match 'sparse_masks' file content!
not ok 5 L3_NONCONT_CAT: test

AMD always supports non-contiguous CBM but does not report it via CPUID.

Fix the non-contiguous CBM test to use CPUID to discover non-contiguous
CBM support only on Intel.

Fixes: ae638551ab64 ("selftests/resctrl: Add non-contiguous CBMs CAT test")
Signed-off-by: Babu Moger <babu.moger@amd.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/resctrl/cat_test.c