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

Wolfgang Denk wd at denx.de
Wed Jun 8 23:41:24 CEST 2011


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.

> We have a set of powerful macros designed for bit-field accesses in IO
> egisters.
> 
> But, what I am looking for is a set of macros for bit-field operations
> on C integer variables without the un-necessary overhead of IO register
> accesses. I am looking for missing APIs in bitops.h not anything from
> io.h

All the overhead we have is a few memory barriers.  Can you measure
any difference in performance?

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
Never underestimate the bandwidth of a station wagon full of tapes.
                                -- Dr. Warren Jackson, Director, UTCS


More information about the U-Boot mailing list