RE: [PATCH] x86: work around clang IAS bug referencing __force_order

From: David Laight
Date: Sun Aug 23 2020 - 09:31:13 EST


From: Arvind Sankar
> Sent: 22 August 2020 22:17
...
> Assuming we don't want to risk removing force_order, I'd suggest
> - make it an input/output operand, so it enforces ordering fully.
> - either restrict it to gcc < 8, or just provide a proper definition in
> some file (maybe arch/x86/kernel/cpu/common.c)?

Is it possible to replace __force_order with a symbol that the
linker scripts defines?
Or just define __force_order in the linker script to some
'random' constant (eg 0).

ISTM that adding "m"(__force_order) to asm volatile can do no harm.
Especially for accesses to CRn and MSRn (etc) which might have obscure
side effects.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)