RE: [PATCH 3/6] x86: Add support for the clwb instruction
From: Anvin, H Peter
Date: Wed Nov 12 2014 - 08:39:14 EST
No, it doesn't. x86 requires 3.4+ at a minimum.
________________________________
From: Borislav Petkov
Sent: Wednesday, November 12, 2014 4:39:09 AM
To: Ross Zwisler
Cc: linux-kernel@xxxxxxxxxxxxxxx; Anvin, H Peter; Ingo Molnar; Thomas Gleixner; David Airlie; dri-devel@xxxxxxxxxxxxxxxxxxxxx; x86@xxxxxxxxxx
Subject: Re: [PATCH 3/6] x86: Add support for the clwb instruction
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.
--
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/