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

David Laight david.laight.linux at gmail.com
Sun Nov 8 12:30:42 PST 2026


On Thu,  5 Nov 2026 17:34:34 +0100
Arnd Bergmann <arnd at kernel.org> wrote:

> From: Arnd Bergmann <arnd at arndb.de>
> 
> 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



More information about the linux-um mailing list