Linux wireless drivers development
 help / color / mirror / Atom feed
From: "Arend van Spriel" <arend@broadcom.com>
To: "Randy Dunlap" <rdunlap@xenotime.net>, "Michael Büsch" <mb@bu3sch.de>
Cc: "george@znau.edu.ua" <george@znau.edu.ua>,
	"zajec5@gmail.com" <zajec5@gmail.com>,
	"linville@tuxdriver.com" <linville@tuxdriver.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [RFC] drivers: brcmaxi: provide amba axi functionality in separate module
Date: Wed, 23 Mar 2011 14:54:12 +0100	[thread overview]
Message-ID: <op.vsst8mfl3ri7v4@arend-laptop> (raw)
In-Reply-To: <1300888183.18815.5.camel@Nokia-N900>

On Wed, 23 Mar 2011 14:49:43 +0100, Michael Büsch <mb@bu3sch.de> wrote:

>
>> void foobar(void *r, u32 val)
>> {
>>     volatile u32 dummy;
>>
>>     WR_REG(r, val);
>>     dummy = RD_REG(r);
>> }
>>
>> The register read is necessary to assure the register write is properly
>> flushed out in hardware. Could removing the volatile for the dummy
>> variable cause removal of the register read due to code optimization.
>
> It shouldn't optimize the read away as long as the RD_REG uses a  
> volatile pointer internally. Which is the case if you use readl/w/b or  
> ioread... to implement RD_REG

Well, RD_REG(r) is a macro which translates to readb((volatile u8*)r). Are  
you referring to that being a volatile pointer or do you mean that inside  
the accessor function readb the 'r' parameter is treated as a volatile  
pointer.

Gr. AvS
-- 
"The most merciful thing in the world, I think, is the inability of the  
human
mind to correlate all its contents." - "The Call of Cthulhu"


  parent reply	other threads:[~2011-03-23 13:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-21 20:16 [RFC] drivers: brcmaxi: AMBA AXI functionality library module Arend van Spriel
2011-03-21 20:16 ` [RFC] drivers: brcmaxi: provide amba axi functionality in separate module Arend van Spriel
2011-03-21 20:28   ` Randy Dunlap
2011-03-21 20:38     ` Johannes Berg
2011-03-21 20:42       ` Randy Dunlap
2011-03-21 20:45         ` Johannes Berg
2011-03-23 10:51     ` Arend van Spriel
     [not found]       ` <1300888183.18815.5.camel@Nokia-N900>
2011-03-23 13:54         ` Arend van Spriel [this message]
2011-03-23 14:09           ` Michael Büsch

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=op.vsst8mfl3ri7v4@arend-laptop \
    --to=arend@broadcom.com \
    --cc=george@znau.edu.ua \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mb@bu3sch.de \
    --cc=rdunlap@xenotime.net \
    --cc=zajec5@gmail.com \
    /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