[U-Boot] [PATCH v3 02/10] armv7: add miscellaneous utility macros

Aneesh V aneesh at ti.com
Tue Jun 14 10:45:51 CEST 2011


Dear Wolfgang,

On Thursday 09 June 2011 03:11 AM, Wolfgang Denk wrote:
> Dear Aneesh V,
>
> In message<4DEF62A6.7060706 at ti.com>  you wrote:
>>
>> I still don't think this is the 'right' solution for my problem. I don't
>> like the fact that clrsetbits_le32() introduces a lot of un-necessary
>> 'volatile's.
>
> Well, with this argument you would also have to refuse using readl()
> and writel() and all other I/O accessor macros.  The only place where
> volatile is used is in the __arch_get*() and __arch_put*() macros, and
> ther eit is supposed to be ok.
>
>
>> Yes, it's about the 'efficiency'. May be it doesn't count in some
>> cases. But, may be it counts in some other cases. Basically, I don't
>> like to sacrifice 'efficiency' unless the cost for achieving it is very
>
> Try and show me a single case where you see a measurable difference in
> performance.
>
>> If you still insist, I can use clrsetbits_le32() in the interest
>> of getting this to a closure.
>
> Please do.  Thanks.

As I start re-working on my patches I realize that there is no
alternative to get_bit_field(). clrsetbits_le32() works as an
alternative for set_bit_field() but I couldn't find anything in io.h
that could replace get_bit_field(). The only option I seem to have is
to mask and shift directly every time. Is that what you prefer over
get_bit_field()?

best regards,
Aneesh


More information about the U-Boot mailing list