public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Simon Kagstrom <simon.kagstrom@netinsight.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] arm: Kirkwood: Add memory barriers to kwgbe_send/recv
Date: Thu, 2 Jul 2009 08:47:02 +0200	[thread overview]
Message-ID: <20090702084702.3e4ecae4@marrow.netinsight.se> (raw)
In-Reply-To: <73173D32E9439E4ABB5151606C3E19E201EA4C0412@SC-VEXCH1.marvell.com>

On Wed, 1 Jul 2009 09:57:10 -0700
Prafulla Wadaskar <prafulla@marvell.com> wrote:
> > kwgbe_send/recv both have loops waiting for the hardware to 
> > set  a bit.
> > GCC 4.3.3 cleverly optimizes this to ... a while(1); loop.
> Struct used is defined as volatile here.
> Is this not sufficient?

Right, but that was only for recv - send isn't volatile. I'll send a
new patch with the required changes. The question is which :-):

1. Make structure volatile in send as well

2. Use readl() where needed

3. Keep the memory barrier approach (and maybe add a mb() macro to arm
   as well)

I'm happy to get suggestions!


I'll prepare the openrd_base board patches a bit more and send them to
the list later today.

// Simon

  reply	other threads:[~2009-07-02  6:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-01 15:16 [U-Boot] [PATCH] arm: Kirkwood: Add memory barriers to kwgbe_send/recv Simon Kagstrom
2009-07-01 16:56 ` Detlev Zundel
2009-07-01 17:09   ` Stefan Roese
2009-07-01 17:14     ` Scott Wood
2009-07-03  9:15       ` Detlev Zundel
2009-07-01 16:57 ` Prafulla Wadaskar
2009-07-02  6:47   ` Simon Kagstrom [this message]
2009-07-02  8:12     ` Prafulla Wadaskar
2009-07-03  8:57       ` Detlev Zundel
2009-07-04 23:52     ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090702084702.3e4ecae4@marrow.netinsight.se \
    --to=simon.kagstrom@netinsight.net \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox