public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jerry Van Baren <gerald.vanbaren@ge.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] cfi_flash.c and lost volatile qualifier
Date: Tue, 29 Apr 2008 17:16:49 -0400	[thread overview]
Message-ID: <48179041.6080008@ge.com> (raw)
In-Reply-To: <alpine.DEB.1.10.0804291703010.13610@pmy.adscville>

Adrian Filipi wrote:
> On Tue, 29 Apr 2008, Wolfgang Denk wrote:
> 
>> In message <alpine.DEB.1.10.0804291604250.32753@pmy.adscville> you wrote:
>>>  	I narrowed down the source of the problem to the loss of the
>>> volatile qualifier on the addr pointer in flash_write_cmd().  Adding the
>>> qualifier gets rid of the corruption.  In the older 1.2.0 sources, addr was
>>> declared as "volatile cfiptr_t addr;".
>> The volatile should not be needed - the CFI driver should use correct
>> accessor macros instead. See
>> Documentation/volatile-considered-harmful.txt in your Linux kernel
>> source tree...
>>
>> Best regards,
>>
>> Wolfgang Denk
> 
>  	Sure, reducing the reliance on volatile is a good idea, but I'm at 
> a loss for anything better to do.
> 
>  	I'm seeing a real problem that is only fixed by qualifying the 
> container of the pointer as volatile, i.e. "void *volatile".  "volatile 
> void *" has no effect as expected given that the read/write accessors are 
> used now.
> 
>  	The old data type was essentially "volatile void *volatile addr" 
> and the new type is simply "void *addr".  I seem to need at least "void 
> *volatile addr" for things to work.
> 
>  	Note, I'm only seeing this problem on our PXA250 boards.
> 
>  	Adrian

Hi Adrian,

Please bottom post.

It may be useful to disassemble cfi_flash.o file (objdump -S) and see 
what the two different configurations of flash_write_cmd() get turned 
into in assembly.

Best regards,
gvb

  reply	other threads:[~2008-04-29 21:16 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-08 14:32 [U-Boot-Users] drivers MMCplus for at91sam9x Pierre Savary
2008-04-09 17:49 ` Jean-Christophe PLAGNIOL-VILLARD
2008-04-10 10:32   ` Pierre Savary
2008-04-10 22:31 ` Ken.Fuchs at bench.com
2008-04-11  8:26   ` Pierre Savary
2008-04-11 15:48   ` Pierre Ossman
2008-04-11 18:54     ` Ken.Fuchs at bench.com
2008-04-12  9:28       ` Pierre Ossman
2008-04-15 10:18         ` Pierre Savary
2008-04-15 16:51           ` Ken.Fuchs at bench.com
     [not found]         ` <-6021840981243159212@unknownmsgid>
2008-04-15 19:25           ` Andy Fleming
2008-04-16  8:55             ` Pierre Savary
2008-04-16 23:30             ` Ken.Fuchs at bench.com
2008-04-22 11:55             ` Pierre Savary
2008-04-22 15:07               ` [U-Boot-Users] [PATCH] Add eSDHC driver Andy Fleming
2008-04-22 16:53                 ` Anton Vorontsov
2008-04-23 19:23                 ` Ken.Fuchs at bench.com
2008-04-24  6:24                   ` Pierre Savary
2008-04-29 19:45                     ` [U-Boot-Users] drivers MMCplus for at91sam9x Ken.Fuchs at bench.com
2008-04-29 20:20                       ` [U-Boot-Users] cfi_flash.c and lost volatile qualifier Adrian Filipi
2008-04-29 20:43                         ` Wolfgang Denk
2008-04-29 21:10                           ` Adrian Filipi
2008-04-29 21:16                             ` Jerry Van Baren [this message]
     [not found]                               ` <alpine.DEB.1.10.0804300949360.13610@pmy.adscville>
2008-04-30 14:43                                 ` Jerry Van Baren
2008-04-30 15:11                                   ` Joakim Tjernlund
2008-04-30 15:21                                     ` Scott Wood
2008-04-30 15:34                                       ` Joakim Tjernlund
2008-04-30 15:41                                         ` Wolfgang Denk
2008-04-30 16:02                                         ` Scott Wood
2008-04-30 16:11                                           ` Joakim Tjernlund
2008-04-30 15:35                                     ` [U-Boot-Users] PPC sync/eieio (was cfi_flash.c and lost volatile qualifier) Jerry Van Baren
2008-04-30 15:38                                   ` [U-Boot-Users] cfi_flash.c and lost volatile qualifier Wolfgang Denk
2008-04-30 15:51                                     ` Jerry Van Baren
2008-05-08 11:17                         ` Haavard Skinnemoen
2008-05-08 14:05                           ` Adrian Filipi
2008-05-08 16:27                             ` Haavard Skinnemoen
2008-04-30 14:20                       ` [U-Boot-Users] drivers MMCplus for at91sam9x Pierre Savary
2008-04-30 16:25                         ` Ken.Fuchs at bench.com
2008-04-30 20:31                         ` Ken.Fuchs at bench.com

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=48179041.6080008@ge.com \
    --to=gerald.vanbaren@ge.com \
    --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