> >> How about using clean_dcache_range() to flush the range runtime
> >> address range [ _stext, _end ] ? That would flush the entire
> >> instructions.
> >
> > Wouldn't that result in more cache flushing than the original
solution?
> >
> > For example, my kernel is 3.5MB.  Assuming a 32 byte cache line
size,
> > clean_dcache_range(_stext, _end) would result in about 115,000
dcbst's
> > (3.5MB / 32).
> 
> Oops ! You are right. We could go back to the 
> clean_dcache_all() or the
> initial approach that you suggested. (dcbst).

Maybe clean_dcache_range() itself should limit the range
to the size of the cache?
I suspect that code can easily know the cache size.

        David


_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to