Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Sep 2002 09:21:53 -0700 (PDT)
From:      Diane Bruce <db@db.net>
To:        gallatin@cs.duke.edu (Andrew Gallatin)
Cc:        freebsd-ppc@FreeBSD.ORG, jkh@FreeBSD.ORG
Subject:   Re: atomic.h vs atomic.s
Message-ID:  <200209301621.g8UGLrV28713@mtbaker.tfm.com>
In-Reply-To: <15768.30116.381592.891890@grasshopper.cs.duke.edu> from "Andrew Gallatin" at Sep 30, 2002 12:02:44 PM

next in thread | previous in thread | raw e-mail | index | archive | help
Andrew Gallatin says:
> 
> 
> When poking around, trying to figure out my mcl problem, I noticed
> that the atomic.s code uses an eieio followed by a sync, whereas
> the code in atomic.h uses just eieio.
> 
> >From my (admittedly very limited) knowledge of ppc, I'd think we
> should be using just sync (like netbsd does).  Or it could be that
> the atomic stwcx instruction implies a sync..

  The biggest difference is, sync ensures all the loads and stores
are synchronised. eieio ensures they happen in the right order.
(enforce in-order execution of I/O) I think eieio is the favourite
instruction of all powerpc coders.

> should be using just sync (like netbsd does).  Or it could be that
> the atomic stwcx instruction implies a sync..

  I suggest you get a copy of M961446248442collateral.pdf its easy
to find on the Motorola site. pg. 1-11 for a start.

> 
> Jordan: Are we allowed to use the Darwin sources as a reference for things
> like this?
> 
> 
> Drew

-- 
Diane Bruce, http://www.db.net/~db db@db.net
--- aphorisms are ephemeral, speling mistakes are not.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ppc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209301621.g8UGLrV28713>