Skip to content

Commit db7a89f

Browse files
brooniewilldeacon
authored andcommitted
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 <broonie@kernel.org> Link: https://lore.kernel.org/r/20230728-arm64-signal-memcpy-fix-v4-5-0c1290db5d46@kernel.org Signed-off-by: Will Deacon <will@kernel.org>
1 parent 35d7bc9 commit db7a89f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tools/testing/selftests/arm64/signal/test_signals_utils.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#include <stdio.h>
99
#include <string.h>
1010

11+
#include <linux/compiler.h>
12+
1113
#include "test_signals.h"
1214

1315
int test_init(struct tdescr *td);
@@ -76,7 +78,7 @@ static __always_inline bool get_current_context(struct tdescr *td,
7678
*/
7779
for (i = 0; i < td->live_sz; i++) {
7880
uc[i] = 0;
79-
__asm__ ("" : "=r" (uc[i]) : "0" (uc[i]));
81+
OPTIMIZER_HIDE_VAR(uc[0]);
8082
}
8183

8284
td->live_uc = dest_uc;

0 commit comments

Comments
 (0)