kselftest/arm64: Refactor parameter checking in mte_switch_mode()
authorMark Brown <broonie@kernel.org>
Tue, 19 Apr 2022 10:32:42 +0000 (11:32 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 28 Apr 2022 16:57:11 +0000 (17:57 +0100)
commitf326c9a6f49b06c0a936d68ae23cb90899835c3b
treeba25e70e45457857b908bf9cdbdc30cfb46d1bfd
parent191e678bdc9be2447dae227f5b6ea1e995c5ee9c
kselftest/arm64: Refactor parameter checking in mte_switch_mode()

Currently we just have a big if statement with a non-specific diagnostic
checking both the mode and the tag. Since we'll need to dynamically check
for asymmetric mode support in the system and to improve debugability split
these checks out.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/20220419103243.24774-4-broonie@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
tools/testing/selftests/arm64/mte/mte_common_util.c