/* These are here in an effort to more fully work around Spitfire Errata *#51.Essentially,ifamemorybarrieroccurssoonafteramispredicted *branch,thechipcanstopexecutinginstructionsuntilatrapoccurs. *Therefore,ifinterruptsaredisabled,thechipcanhangforever. * *Itusedtobebelievedthatthememorybarrierhadtoberightinthe *delayslot,butacasehasbeentracedrecentlywhereinthememorybarrier *wasoneinstructionafterthebranchdelayslotandthechipstillhung. *Theoffendingsequencewasthefollowinginsym_wakeup_done()ofthe *sym53c8xx_2driver: * *callsym_ccb_from_dsa,0 *movge%icc,0,%l0 *brz,pn%o0,.LL1303 *mov%o0,%l2 *membar#LoadLoad * *Thebranchhastobemispredictedforthebugtooccur.Therefore,weput *thememorybarrierexplicitlyintoa"branchalways,predictedtaken" *delayslottoavoidtheproblemcase.
*/ #define membar_safe(type) \ do { __asm__ __volatile__("ba,pt %%xcc, 1f\n\t" \ " membar " type "\n" \ "1:\n" \
: : : "memory"); \
} while (0)
/* The kernel always executes in TSO memory model these days, *andfurthermoremostsparc64chipsimplementmorestringent *memoryorderingthanrequiredbythespecifications.
*/ #define mb() membar_safe("#StoreLoad") #define rmb() __asm__ __volatile__("":::"memory") #define wmb() __asm__ __volatile__("":::"memory")
#define __smp_store_release(p, v) \ do { \
compiletime_assert_atomic_type(*p); \
barrier(); \
WRITE_ONCE(*p, v); \
} while (0)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.