Skip to content

Commit

Permalink
x86: use alternative_input() in cache_flush()
Browse files Browse the repository at this point in the history
There's no point using alternative_io() when there are no outputs. While
there drop the unnecessary semicolon after "ds".

No functional change.

Signed-off-by: Jan Beulich <[email protected]>
Acked-by: Andrew Cooper <[email protected]>
  • Loading branch information
jbeulich committed Oct 1, 2024
1 parent db70a52 commit b42cf31
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions xen/arch/x86/flushtlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,10 @@ void cache_flush(const void *addr, unsigned int size)
* + prefix than a clflush + nop, and hence the prefix is added instead
* of letting the alternative framework fill the gap by appending nops.
*/
alternative_io("ds; clflush %[p]",
"data16 clflush %[p]", /* clflushopt */
X86_FEATURE_CLFLUSHOPT,
/* no outputs */,
[p] "m" (*(const char *)(addr)));
alternative_input("ds clflush %[p]",
"data16 clflush %[p]", /* clflushopt */
X86_FEATURE_CLFLUSHOPT,
[p] "m" (*(const char *)(addr)));
}

alternative_2("",
Expand Down

0 comments on commit b42cf31

Please sign in to comment.