Hi Shaopeng,

On 1/22/26 8:40 PM, Shaopeng Tan wrote:
> Arm(MPAM driver) also supports non-contiguous CBM.
> So enable noncont_cat for Arm.
> 
> Signed-off-by: Shaopeng Tan <[email protected]>
> ---
>  tools/testing/selftests/resctrl/cat_test.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/resctrl/cat_test.c 
> b/tools/testing/selftests/resctrl/cat_test.c
> index 94cfdba5308d..e1b30ab4cef5 100644
> --- a/tools/testing/selftests/resctrl/cat_test.c
> +++ b/tools/testing/selftests/resctrl/cat_test.c
> @@ -291,7 +291,8 @@ static int cat_run_test(const struct resctrl_test *test, 
> const struct user_param
>  static bool arch_supports_noncont_cat(const struct resctrl_test *test)
>  {
>       /* AMD always supports non-contiguous CBM. */
> -     if (get_vendor() == ARCH_AMD)
> +     /* ARM(MPAM driver) also supports non-contiguous CBM. */
> +     if (get_vendor() == ARCH_AMD || get_vendor() == ARCH_ARM)
>               return true;

As an enhancement could you please use a local variable instead of calling
get_vendor() twice? An example of such can be seen in:
86063a2568b8 ("selftests/resctrl: Fix non-contiguous CBM check for Hygon")

Reinette

Reply via email to