Re: [PATCH 3/3] x86/asm: Add support for WBNOINVD instruction

From: Thomas Gleixner
Date: Thu Mar 15 2018 - 05:21:54 EST


On Fri, 19 Jan 2018, Kirill A. Shutemov wrote:

> This patch implements infrastructure to call WBNOINVD instruction.

grep 'This patch' Documentation/process/

> The basic idea is to match what we have for WBINVD.

Is it just an idea or is it actually doing it?

> The instruction is defined as WBINVD with REP (0xf3) prefix. If the
> machine doesn't support the instruction the prefix will be ignored and
> we would fallback to WBINVD.

We fallback? We do nothing.

The CPU ignores the prefix and falls back to WBINVD, right?

> +
> +#define wbnoinvd_on_cpu(cpu) wbnoinvd()
> +static inline int wbnoinvd_on_all_cpus(void)

Bah. Please stop glueing defines in front of the function body. That's just
makes it harder to read.

Thanks,

tglx