[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3] xen/arm: flush D-cache and I-cache when appropriate



On Mon, 2012-11-19 at 13:08 +0000, Tim Deegan wrote:
> Sorry for the late review - I meant to get to these on Thursday but
> hadn't time.  
> 
> At 12:55 +0000 on 19 Nov (1353329757), Ian Campbell wrote:
> > > +/* Macro for flushing a single small item.  The predicate is always 
> > > + * compile-time constant so this will compile down to 3 instructions in
> > > + * the common case. 
> 
> This is no longer true!  The predicate now depends on the alignment of
> the pointer, so this will compile to quite a bit of code, including the
> memory barrier I was trying to avoid.

If p is static then isn't p + sizeof(*p) etc static and therefore the
compiler can figure it out?

Stefano, what does it actually compile down to in practice?

> If we can sensibly restrict this to naturally-aligned objects smaller
> than a cacheline, we should go back to the previous version of this
> macro.  If not, I think we might as well just use
> flush_xen_dcache_va_range(_p, sizeof *_p) and be done with it.

I've already committed it, so please send a followup patch of whichever
sort is needed.

Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.