Re: 2.6.10 DRM and 80386

From: Roberto C. Sanchez (roberto_at_familiasanchez.net)
Date: 02/17/05

  • Next message: Wayne Topa: "Re: Where do elm/elm-me+ reside?"
    Date: Wed, 16 Feb 2005 22:20:14 -0500
    To: debian-user@lists.debian.org
    
    
    

    paula4l wrote:
    > I'm running linux-2.6.10-686 on an 80386 pentium 3 and I notice the note
    > in the README:
    >
    > 80386 compatibility
    > -------------------
    > DRM modules will not work on true 80386 processors. These drivers all
    > assume that cmpxchg is available.
    >
    > What does this mean to me? Should I go back to 2.4.27 and wait until a
    > later version of 2.6.x?
    >

    The Pentium 3 is actually of the i686 family (or 80686 if you prefer,
    but it is not actually called that). Here is the breakdown:

    i386: 80386
    i486: 80486
    i586: Pentuim (classic), VIA Eden and C3 (IIRC)
    i686: Pentium Pro/II/III/4, Xeon, Athlon, Duron, etc.

    The note you refer to has to do with the fact that the 80386 and earlier
    processors did not implement the cmpxchg insctruction which was
    introduced with the 80486. This instruction compared the contents of
    two registers, set the appropriate status flags and then swapped the
    contents, all in one instruction.

    It is possible, in fact, to simulate the instruction in software. But
    that is very expensive and should only be done if absolutely necessary.
    I.e., if you *require* to run a program compiled for i486 on an i386
    machine:

    ----------
    486 emulation (X86_EMU486) [N/y/?] ?

    When used on a 386, Linux can emulate 3 instructions from the 486
    set. This allows user space programs compiled for 486 to run on a
    386 without crashing with a SIGILL. As any emulation, performance
    will be very low, but since these instruction are not often used,
    this might not hurt. The emulated instructions are:
        - bswap (does the same as htonl())
        - cmpxchg (used in multi-threading, mutex locking)
        - xadd (rarely used)

    Note that this can also allow Step-A 486's to correctly run
    multi-thread applications since cmpxchg has a wrong opcode on this
    early CPU.
    ---------

    Basically, unless you are running a no kidding 386 SX or DX (or the
    equivalent Cyrix chip), there is nothing to worry about. Sorry if
    this is more info than you wanted, but I wanted to be thorough.

    -Roberto

    --
    Roberto C. Sanchez
    http://familiasanchez.net/~sanchezr
    
    

    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    


  • Next message: Wayne Topa: "Re: Where do elm/elm-me+ reside?"

    Relevant Pages

    • Re: 80386 support in -current
      ... So, indeed, xchg is *lot* slower on p4 in non-SMP case than cmpxchgl, I ... functions in atomic.h to use cmpxchg instead of xchg, ... cmpxchgb %b1,%0; jnz 1b"); ... >>particular instruction which was introduced with the 486 and must be ...
      (freebsd-current)
    • Re: ZFS committed to the FreeBSD base.
      ... Enough that it outweighs the benefit of using that instruction in the ... cmpxchg only has an execution latency of 6 cycles (both without a lock ... In the worst case, on an SMP machine, they stall ... can't keep pipelines moving anyway, ...
      (freebsd-current)
    • Re: TSCs are a no-no on i386
      ... There is no such instruction. ... you'll get either cmpxchg or xadd (or cmpxchg8b, ... And as far as I know, userspace solution does not qualify: ... own synchronization, ...
      (Linux-Kernel)