Commit db7a89f7 authored by Mark Brown's avatar Mark Brown Committed by Will Deacon

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: default avatarMark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230728-arm64-signal-memcpy-fix-v4-5-0c1290db5d46@kernel.orgSigned-off-by: default avatarWill Deacon <will@kernel.org>
parent 35d7bc98
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <linux/compiler.h>
#include "test_signals.h" #include "test_signals.h"
int test_init(struct tdescr *td); int test_init(struct tdescr *td);
...@@ -76,7 +78,7 @@ static __always_inline bool get_current_context(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++) { for (i = 0; i < td->live_sz; i++) {
uc[i] = 0; uc[i] = 0;
__asm__ ("" : "=r" (uc[i]) : "0" (uc[i])); OPTIMIZER_HIDE_VAR(uc[0]);
} }
td->live_uc = dest_uc; td->live_uc = dest_uc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment