Re: [PATCH v9 04/10] x86: refcount: prevent gcc distortions

From: Ingo Molnar
Date: Thu Oct 04 2018 - 04:56:12 EST



* hpa@xxxxxxxxx <hpa@xxxxxxxxx> wrote:

> It's not just for working around a stupid GCC bug, but it also has a huge potential for
> cleaning up the inline asm in general.

Sorry but that's just plain false. For example this patch:

x86: cpufeature: use macros instead of inline assembly

... adds an extra macro indirection layer called STATIC_CPU_HAS, just to macrofy a single asm()
statement that was perfectly readable and on-topic already...

There are some other cases where macrofying is also a cleanup due to sharing and naming a
common pattern of code, but this is by no means an absolute quality of this approach.

Thanks,

Ingo