RE: [RFC][PATCH 02/22] x86,mmx_32: Remove .fixup usage

David Laight
2021-11-05T11:20:57Z

From: Borislav Petkov
> Sent: 04 November 2021 18:01
>
> On Thu, Nov 04, 2021 at 05:47:31PM +0100, Peter Zijlstra wrote:
> > This code puts an exception table entry on the "PREFIX" instruction to
> > overwrite it with a jmp.d8 when it triggers an exception. Except of
> > course, our code is no longer writable, also SMP.
> >
> > Replace it with ALTERNATIVE, the novel
> >
> > XXX: arguably we should just delete this code
>
> Yah, might as well.
>
> Wikipedia says the last AMD CPU which supports 3DNow is A8-3870K which
> is family 0x11, i.e.,
>
> 1. a real rarity
> 2. it is pretty much obsolete
> 3. even if not, it can do AMD64
> 4. and even if people who have it, wanna run 32-bit, they can use the
> normal memcpy, i.e., CONFIG_X86_USE_3DNOW=n should work there
>
> In our case, it is a bit different, though:
>
> config X86_USE_3DNOW
> def_bool y
> depends on (MCYRIXIII || MK7 || MGEODE_LX) && !UML
>
> MK7 is K7 - that is practically dead.
>
> The only thing I have no clue about are those cyrix and geode things and
> whether they're still actively used in some embedded gunk.

And whether the prefetch actually helps on those at all.

And even if it does, do enough memcpy() need to prefetch the
data to make it an actual gain - rather than just slowing
down memcpy() where the buffers are cache resident.

Not to mention the cases where prefetching on the source displaces
a target buffer cache line.

David

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