RE: [PATCH] x86: work around clang IAS bug referencing __force_order
From: David Laight
Date: Thu Aug 13 2020 - 04:49:20 EST
From: Nick Desaulniers
> Sent: 13 August 2020 01:13
> On Thu, Aug 6, 2020 at 3:11 PM Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
> > Arnd Bergmann <arnd@xxxxxxxx> writes:
> > > When using the clang integrated assembler, we get a reference
> > > to __force_order that should normally get ignored in a few
> > > rare cases:
> > >
> > > ERROR: modpost: "__force_order" [drivers/cpufreq/powernow-k6.ko] undefined!
> > >
> > > Add a 'static' definition so any file in which this happens can
> > > have a local copy.
> > That's a horrible hack.
> Agreed. And static means everyone gets their own copy, rather than
> sharing one memory address. I guess no one actually writes to it, so
> it doesn't really matter, but __force_order just seems so strange to
It could be changed to use a symbol that the linker script already defines.
However it does look like a workaround for a broken version of gcc.
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)