[PATCH 13/22] selftests/resctrl: Refactor get_cbm_mask()