* [U-Boot] WARNING: in gcc 4.5.0 and 4.5.1 volatile is ignored
@ 2011-01-22 12:46 Alexander Holler
2011-01-22 14:14 ` Wolfgang Denk
2011-01-22 17:40 ` Dirk Behme
0 siblings, 2 replies; 8+ messages in thread
From: Alexander Holler @ 2011-01-22 12:46 UTC (permalink / raw)
To: u-boot
Hello,
because I've recently seen some other places where volatile is used to
access registers without using read?() or write?() and many people seem
to start using 4.5.1, I want to post this warning using a descriptive
subject.
The keyword volatile might not have any effect when reading when gcc
4.5.0 or 4.5.1 is used.
The appropriate bug seems to be that one:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45052
You might either change such code to use readb(), readw() or readl(), or
you have to use either an older version of gcc or a version >= 4.5.2 (it
is fixed in 4.5.2).
A patch for write?() and read?() is currently in the
u-boot-arm-repository (but not in the master and not in 2010.12):
http://lists.denx.de/pipermail/u-boot/2011-January/084885.html
Regards,
Alexander
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] WARNING: in gcc 4.5.0 and 4.5.1 volatile is ignored
2011-01-22 12:46 [U-Boot] WARNING: in gcc 4.5.0 and 4.5.1 volatile is ignored Alexander Holler
@ 2011-01-22 14:14 ` Wolfgang Denk
2011-01-22 17:40 ` Dirk Behme
1 sibling, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2011-01-22 14:14 UTC (permalink / raw)
To: u-boot
Dear Alexander Holler,
In message <4D3AD19B.6030102@ahsoftware.de> you wrote:
>
> because I've recently seen some other places where volatile is used to
> access registers without using read?() or write?() and many people seem
> to start using 4.5.1, I want to post this warning using a descriptive
> subject.
>
> The keyword volatile might not have any effect when reading when gcc
> 4.5.0 or 4.5.1 is used.
Actuelly this warning should eventually be extended to carefully check
results when using any of the currently available 4.5.x versions of
GCC.
> The appropriate bug seems to be that one:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45052
This is probably only one part of the problem. Thereare a number of
other bugs in thes ecompiler versions, for example this one:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44392
Unfortunately there appears to be little interest within the GCC folks
to fix porolems that affect only such lunatic fringe groups as the
embedded folks, so I don't expect to see fixes any time soon. Even
bigger projects like the Linux Foundation driven Poky (resp. Yocto
project) capitulated and stopped using -Os, see for example here:
http://thread.gmane.org/gmane.linux.embedded.poky/2311/focus=2565
Yes, "-Os" is default setting for U-Boot - changing it to (for example)
-O2 will generate significantly larger code and even break a number of
boards.
It appears there are a number of other issues with GCC 4.5.x that
affect us. If you are using any such tool chain, and see strange
results or unexpected breakages, it is probably a very good idea to
try another (older, working) tool chain first, before spending any tme
on debugging.
> You might either change such code to use readb(), readw() or readl(), or
> you have to use either an older version of gcc or a version >= 4.5.2 (it
> is fixed in 4.5.2).
We will take care to provide working (at least with most of the
compiler versions) I/O accessors (including sufficient memory
barriers), and all code that uses the old volatile pointer approach
to access device registers should be converted to use proper I/O
acessors.
> A patch for write?() and read?() is currently in the
> u-boot-arm-repository (but not in the master and not in 2010.12):
>
> http://lists.denx.de/pipermail/u-boot/2011-January/084885.html
Thanks for raising this issue again.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The ideal situation is to have massive computing power right at home.
Something that dims the streetlights and shrinks the picture on the
neighbours' TVs when you boot it up.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] WARNING: in gcc 4.5.0 and 4.5.1 volatile is ignored
2011-01-22 12:46 [U-Boot] WARNING: in gcc 4.5.0 and 4.5.1 volatile is ignored Alexander Holler
2011-01-22 14:14 ` Wolfgang Denk
@ 2011-01-22 17:40 ` Dirk Behme
2011-01-22 18:03 ` Albert ARIBAUD
1 sibling, 1 reply; 8+ messages in thread
From: Dirk Behme @ 2011-01-22 17:40 UTC (permalink / raw)
To: u-boot
On 22.01.2011 13:46, Alexander Holler wrote:
> A patch for write?() and read?() is currently in the
> u-boot-arm-repository (but not in the master and not in 2010.12):
>
> http://lists.denx.de/pipermail/u-boot/2011-January/084885.html
What's about pulling it sooner than later into master, then?
And would it be worth to think about applying this to 2010.12 and
creating a 2010.12.1?
Best regards
Dirk
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] WARNING: in gcc 4.5.0 and 4.5.1 volatile is ignored
2011-01-22 17:40 ` Dirk Behme
@ 2011-01-22 18:03 ` Albert ARIBAUD
2011-01-22 19:30 ` Wolfgang Denk
0 siblings, 1 reply; 8+ messages in thread
From: Albert ARIBAUD @ 2011-01-22 18:03 UTC (permalink / raw)
To: u-boot
Hi Dirk,
Le 22/01/2011 18:40, Dirk Behme a ?crit :
> On 22.01.2011 13:46, Alexander Holler wrote:
>> A patch for write?() and read?() is currently in the
>> u-boot-arm-repository (but not in the master and not in 2010.12):
>>
>> http://lists.denx.de/pipermail/u-boot/2011-January/084885.html
>
> What's about pulling it sooner than later into master, then?
I will send out a pull request for u-boot-arm once I have applied all
outstanding ARM patches from jan 17 or before and all outstanding ARM
bug fixes regardless of their date, and pulled other ARM repos whose
custodian requests pulling.
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] WARNING: in gcc 4.5.0 and 4.5.1 volatile is ignored
2011-01-22 18:03 ` Albert ARIBAUD
@ 2011-01-22 19:30 ` Wolfgang Denk
2011-01-22 20:23 ` Albert ARIBAUD
0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Denk @ 2011-01-22 19:30 UTC (permalink / raw)
To: u-boot
Dear Albert ARIBAUD,
In message <4D3B1C0C.4040805@free.fr> you wrote:
>
> Le 22/01/2011 18:40, Dirk Behme a =E9crit :
> > On 22.01.2011 13:46, Alexander Holler wrote:
> >> A patch for write?() and read?() is currently in the
> >> u-boot-arm-repository (but not in the master and not in 2010.12):
> >>
> >> http://lists.denx.de/pipermail/u-boot/2011-January/084885.html
> >
> > What's about pulling it sooner than later into master, then?
>
> I will send out a pull request for u-boot-arm once I have applied all
> outstanding ARM patches from jan 17 or before and all outstanding ARM
> bug fixes regardless of their date, and pulled other ARM repos whose
> custodian requests pulling.
Thanks - but I also think that Dirk's proposal to create a v2010.12.1
bug fix release makes sense. What do you think?
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Star Trek Lives!
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] WARNING: in gcc 4.5.0 and 4.5.1 volatile is ignored
2011-01-22 19:30 ` Wolfgang Denk
@ 2011-01-22 20:23 ` Albert ARIBAUD
2011-01-24 13:03 ` Wolfgang Denk
0 siblings, 1 reply; 8+ messages in thread
From: Albert ARIBAUD @ 2011-01-22 20:23 UTC (permalink / raw)
To: u-boot
Le 22/01/2011 20:30, Wolfgang Denk a ?crit :
> Dear Albert ARIBAUD,
>
> In message<4D3B1C0C.4040805@free.fr> you wrote:
>>
>> Le 22/01/2011 18:40, Dirk Behme a =E9crit :
>>> On 22.01.2011 13:46, Alexander Holler wrote:
>>>> A patch for write?() and read?() is currently in the
>>>> u-boot-arm-repository (but not in the master and not in 2010.12):
>>>>
>>>> http://lists.denx.de/pipermail/u-boot/2011-January/084885.html
>>>
>>> What's about pulling it sooner than later into master, then?
>>
>> I will send out a pull request for u-boot-arm once I have applied all
>> outstanding ARM patches from jan 17 or before and all outstanding ARM
>> bug fixes regardless of their date, and pulled other ARM repos whose
>> custodian requests pulling.
>
> Thanks - but I also think that Dirk's proposal to create a v2010.12.1
> bug fix release makes sense. What do you think?
I didn't comment on this point as it was not for me to decide upon
releasing an interim U-boot version :) but I'm fine with it if you do.
When I rebase on u-boot/master before sending my pull request, I'll
simply skip the corresponding patch in my tree as it will already be on
yours.
> Best regards,
>
> Wolfgang Denk
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] WARNING: in gcc 4.5.0 and 4.5.1 volatile is ignored
2011-01-22 20:23 ` Albert ARIBAUD
@ 2011-01-24 13:03 ` Wolfgang Denk
2011-01-24 18:18 ` Albert ARIBAUD
0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Denk @ 2011-01-24 13:03 UTC (permalink / raw)
To: u-boot
Dear Albert ARIBAUD,
In message <4D3B3CB9.2060804@free.fr> you wrote:
>
> > Thanks - but I also think that Dirk's proposal to create a v2010.12.1
> > bug fix release makes sense. What do you think?
>
> I didn't comment on this point as it was not for me to decide upon
> releasing an interim U-boot version :) but I'm fine with it if you do.
> When I rebase on u-boot/master before sending my pull request, I'll
> simply skip the corresponding patch in my tree as it will already be on
> yours.
As soon as you send the pull-request for ARM (when will that be, btw?)
I will also cherry-pick that commit into a .1 stable branch.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"The greatest warriors are the ones who fight for peace."
- Holly Near
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] WARNING: in gcc 4.5.0 and 4.5.1 volatile is ignored
2011-01-24 13:03 ` Wolfgang Denk
@ 2011-01-24 18:18 ` Albert ARIBAUD
0 siblings, 0 replies; 8+ messages in thread
From: Albert ARIBAUD @ 2011-01-24 18:18 UTC (permalink / raw)
To: u-boot
Le 24/01/2011 14:03, Wolfgang Denk a ?crit :
> Dear Albert ARIBAUD,
>
> In message<4D3B3CB9.2060804@free.fr> you wrote:
>>
>>> Thanks - but I also think that Dirk's proposal to create a v2010.12.1
>>> bug fix release makes sense. What do you think?
>>
>> I didn't comment on this point as it was not for me to decide upon
>> releasing an interim U-boot version :) but I'm fine with it if you do.
>> When I rebase on u-boot/master before sending my pull request, I'll
>> simply skip the corresponding patch in my tree as it will already be on
>> yours.
>
> As soon as you send the pull-request for ARM (when will that be, btw?)
> I will also cherry-pick that commit into a .1 stable branch.
Ok. I am going through my patchwork backlog; I might be done tomorrow
evening, but more probably the day after.
> Best regards,
>
> Wolfgang Denk
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-01-24 18:18 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-22 12:46 [U-Boot] WARNING: in gcc 4.5.0 and 4.5.1 volatile is ignored Alexander Holler
2011-01-22 14:14 ` Wolfgang Denk
2011-01-22 17:40 ` Dirk Behme
2011-01-22 18:03 ` Albert ARIBAUD
2011-01-22 19:30 ` Wolfgang Denk
2011-01-22 20:23 ` Albert ARIBAUD
2011-01-24 13:03 ` Wolfgang Denk
2011-01-24 18:18 ` Albert ARIBAUD
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox