selftests/resctrl: Add helper to convert L2/3 to integer
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Fri, 15 Dec 2023 15:05:13 +0000 (17:05 +0200)
committerShuah Khan <skhan@linuxfoundation.org>
Tue, 13 Feb 2024 20:56:45 +0000 (13:56 -0700)
commite73dda7ffd858a58ddeb9c53603ae14f2af8927c
tree4c82cbd67b593be648bd7829c648d0765fba1330
parentca1608875ae21bb40a7731b81bc0e2c95622d502
selftests/resctrl: Add helper to convert L2/3 to integer

"L2"/"L3" conversion to integer is embedded into get_cache_size()
which prevents reuse.

Create a helper for the cache string to integer conversion to make
it reusable.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/resctrl/resctrlfs.c