On Tue, Nov 11, 2014 at 11:43:13AM -0700, Ross Zwisler wrote:
+static inline void clwb(volatile void *__p) +{
- alternative_io_2(".byte " __stringify(NOP_DS_PREFIX) "; clflush %P0",
".byte 0x66; clflush %P0",
X86_FEATURE_CLFLUSHOPT,
".byte 0x66; xsaveopt %P0",
Btw, I'm afraid you're going to have to spell out those new instruction mnemonics as they aren't supported by older compilers:
CC drivers/gpu/drm/drm_cache.o {standard input}: Assembler messages: {standard input}:63: Error: no such instruction: `xsaveopt (%rax)' {standard input}:249: Error: no such instruction: `xsaveopt (%rdi)' {standard input}:283: Error: no such instruction: `xsaveopt -1(%rdx)' make[1]: *** [drivers/gpu/drm/drm_cache.o] Error 1 make: *** [drivers/gpu/drm/drm_cache.o] Error 2 [boris@etch:14:35:40:k:14)-> gcc --version gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
This is on a very old guest I have which has this gcc in it and the kernel supports everything gcc >= 3.2.