:Or (maybe more clearly):
:
:#ifdef SMP
:#define        SMP_LOCK        "lock; "
:#else
:#define        SMP_LOCK
:#endif
:
:#define ATOMIC_ASM(type,op)    \
:    __asm __volatile (SMP_LOCK op : "=m" (*(type *)p) : "ir" (v), "0" (*(type *)p))

     Yes, precisely.

:I believe the API to the PCI-locking routines should be distinct from
:the API for SMP locks - even though the underlying implementation may
:be common.

    This is more a driver issue then anything else.

:Based on the impact above, I believe the lock prefixes should not
:be inserted until they are necessary - even if it does mean we wind
:up with /modules and /modules.smp.  I don't believe that moving
:to indirect function pointers is a reasonable work-around.
:
:Peter

    We can certainly remove it for the UP case, but it needs to stay in
    for the SMP case because there is a 100% chance that these routines
    are going to have to be SMP safe when the big giant lock hits up against
    the VM system.  It will become even more important after interrupts are
    moved into their own threads if we want to be able to run interrupts
    in parallel with other supervisor code (e.g. network interrupt and network
    stack ).

                                        -Matt
                                        Matthew Dillon 
                                        <[EMAIL PROTECTED]>


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to