Re: [PATCH] x86/asm: Use CC_SET/CC_OUT in percpu_cmpxchg16b_double

From: Uros Bizjak
Date: Sun Dec 30 2018 - 06:18:41 EST

On 12/28/18, Uros Bizjak <ubizjak@xxxxxxxxx> wrote:
> Use CC_SET(z)/CC_OUT(z) instead of explicit setz instruction.
> Using these two defines, the compiler that supports generation of
> condition code outputs from inline assembly flags generates one
> conditional jump instruction, e.g:

Unfortunatelly, the 0day kernel test robot reports:

[ 1.569154] DEBUG_LOCKS_WARN_ON(unlikely(early_boot_irqs_disabled))
[ 1.569287] WARNING: CPU: 0 PID: 0 at kernel/locking/lockdep.c:2803

presumably due to unconditional interrupt enable in
this_cpu_cmpxchg16b_emu. I have to somehow disable X86_FATURE_CX16 and
thoroughly test the library path.