diff options
author | Mark Brown <[email protected]> | 2023-07-28 00:26:16 +0100 |
---|---|---|
committer | Will Deacon <[email protected]> | 2023-08-04 17:36:52 +0100 |
commit | db7a89f706d6080121b61099b1d69a752ce0c61e (patch) | |
tree | 63c9372a142f45456b0e5a30ebf8714f6c292486 | |
parent | 35d7bc983a74db7067d874be2708a7d3bc269f13 (diff) |
kselftest/arm64: Use shared OPTIMZER_HIDE_VAR() definiton
We had open coded the definition of OPTIMIZER_HIDE_VAR() as a fix but now
that we have the generic tools/include available and that has had a
definition of OPTIMIZER_HIDE_VAR() we can switch to the define.
Signed-off-by: Mark Brown <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
-rw-r--r-- | tools/testing/selftests/arm64/signal/test_signals_utils.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/testing/selftests/arm64/signal/test_signals_utils.h b/tools/testing/selftests/arm64/signal/test_signals_utils.h index c7f5627171dd..762c8fe9c54a 100644 --- a/tools/testing/selftests/arm64/signal/test_signals_utils.h +++ b/tools/testing/selftests/arm64/signal/test_signals_utils.h @@ -8,6 +8,8 @@ #include <stdio.h> #include <string.h> +#include <linux/compiler.h> + #include "test_signals.h" int test_init(struct tdescr *td); @@ -76,7 +78,7 @@ static __always_inline bool get_current_context(struct tdescr *td, */ for (i = 0; i < td->live_sz; i++) { uc[i] = 0; - __asm__ ("" : "=r" (uc[i]) : "0" (uc[i])); + OPTIMIZER_HIDE_VAR(uc[0]); } td->live_uc = dest_uc; |