Re: [PATCH 3/7] x86: make CX8 usage unconditional

From: David Laight

Date: Sun Nov 08 2026 - 15:49:29 EST


On Thu, 5 Nov 2026 17:34:34 +0100
Arnd Bergmann <arnd@xxxxxxxxxx> wrote:

> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> All supported CPUs now provide the cmpxchg8b instruction, so remove
> all compile-time and runtime checks for its presence and the fallback
> implementation, to assume it just works.

Is it worth doing a run-time check early on any (trying) to output
a message and fail to boot?

There are probably a few other things the kernel could rely on, but
probably ought to do a check 'just in case'.

One that springs to mind is whether 'find first set' leaves the dest
unchanged for zero. There is a comment that 'at least some 486 didn't'
but assuming it can make code smaller.
(Basically you can do a double-width operation by putting the result
from the low word in the destination before doing the high word.)
But it would be nice to have one test case during boot.

David