From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Thu, 15 Mar 2012 12:56:02 -0500 Subject: [U-Boot] [PATCH v4 06/27] ppc: Add initial memory barrier macros In-Reply-To: <1331777784-8528-7-git-send-email-sjg@chromium.org> References: <1331777784-8528-1-git-send-email-sjg@chromium.org> <1331777784-8528-7-git-send-email-sjg@chromium.org> Message-ID: <4F622D32.7010105@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 03/14/2012 09:16 PM, Simon Glass wrote: > These are available on other architectures, so add them on ppc. > > Signed-off-by: Simon Glass > --- > > arch/powerpc/include/asm/io.h | 8 ++++++++ > 1 files changed, 8 insertions(+), 0 deletions(-) > > diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h > index 56ac9fe..d246fd8 100644 > --- a/arch/powerpc/include/asm/io.h > +++ b/arch/powerpc/include/asm/io.h > @@ -318,4 +318,12 @@ static inline phys_addr_t virt_to_phys(void * vaddr) > #endif > } > > +/* > + * TODO: The kernel offers some more advanced versions of barriers, it might > + * have some advantages to use them instead of the simple one here. > + */ > +#define dmb() __asm__ __volatile__ ("" : : : "memory") > +#define __iormb() dmb() > +#define __iowmb() dmb() What are the semantics of these (they are not the standard Linux barriers), and how is a simple compiler barrier adequate? -Scott