Date: Mon, 8 May 2006 00:36:05 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 96810 for review Message-ID: <200605080036.k480a5fx039540@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=96810 Change 96810 by kmacy@kmacy_storage:sun4v_rwbuf on 2006/05/08 00:35:29 don't use lduw to avoid stomping on bit 31 use membars when setting active Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/swtch.S#21 edit Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/swtch.S#21 (text+ko) ==== @@ -40,22 +40,28 @@ #define PCB_REG %g6 +#define MEMBAR_PRE membar #LoadStore|#StoreStore +#define MEMBAR_POST membar #LoadLoad + #define ATOMIC_CLEAR_INT_BIT(addr, old, bit, new, label) \ - lduw [addr], old ; \ + MEMBAR_PRE ; \ + ld [addr], old ; \ label: andn old, bit, new ; \ cas [addr], old, new ; \ cmp old, new ; \ - bne,pn %icc, label ## b ; \ - mov new, old - + bne,a,pn %icc, label ## b ; \ + ld [addr], old ; \ + MEMBAR_POST + #define ATOMIC_SET_INT_BIT(addr, old, bit, new, label) \ - lduw [addr], old ; \ + MEMBAR_PRE ; \ + ld [addr], old ; \ label: or old, bit, new ; \ cas [addr], old, new ; \ cmp old, new ; \ - bne,pn %icc, label ## b ; \ - mov new, old - + bne,a,pn %icc, label ## b ; \ + ld [addr], old ; \ + MEMBAR_POST /* * void cpu_throw(struct thread *old, struct thread *new) */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605080036.k480a5fx039540>