[lkml]   [2006]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [patch 00/21] mutex subsystem, -V14

    * Joel Schopp <> wrote:

    > The bne- and isync together form a sufficient import barrier. See
    > PowerPC Book2 Appendix B.2.1.1

    ok. Please correct me if i'm wrong: the question is, could we on ppc64
    use atomic_dec_return() for mutex_lock(), and atomic_inc_return() for

    atomic_dec_return() does:

    "1: lwarx %0,0,%1 # atomic_dec_return\n\
    addic %0,%0,-1\n"
    " stwcx. %0,0,%1\n\
    bne- 1b"

    the EIEIO_ON_SMP is in essence smp_wmb(), correct? (it's a bit stronger
    because it also orders IO-space writes, but it doesnt impose any
    restrictions on reads)

    ISYNC_ON_SMP flushes all speculative reads currently in the queue - and
    is hence a smp_rmb_backwards() primitive [per my previous mail] - but
    does not affect writes - correct?

    if that's the case, what prevents a store from within the critical
    section going up to right after the EIEIO_ON_SMP, but before the
    atomic-dec instructions? Does any of those instructions imply some
    barrier perhaps? Are writes always ordered perhaps (like on x86 CPUs),
    and hence the store before the bne is an effective write-barrier?

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2006-01-05 23:24    [W:0.021 / U:3.216 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site