[U-Boot] [PATCH] arm: Kirkwood: Add memory barriers to kwgbe_send/recv

Detlev Zundel dzu at denx.de
Fri Jul 3 10:57:50 CEST 2009


Hi Prafulla,

>> -----Original Message-----
>> From: Simon Kagstrom [mailto:simon.kagstrom at netinsight.net] 
>> Sent: Thursday, July 02, 2009 12:17 PM
>> To: Prafulla Wadaskar
>> Cc: U-Boot ML
>> Subject: Re: [U-Boot] [PATCH] arm: Kirkwood: Add memory 
>> barriers to kwgbe_send/recv
>> 
>> On Wed, 1 Jul 2009 09:57:10 -0700
>> Prafulla Wadaskar <prafulla at 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
> Hi Simon
> I suggest to implement this change

Did you read Documentation/volatile-considered-harmful.txt in a Linux
source tree?

Cheers
  Detlev

-- 
Practice random senselessness and act kind of beautiful.
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de


More information about the U-Boot mailing list