Elimination of cpu_l2cache_* functions
Olivier Houchard
mlfbsd at ci0.org
Wed Feb 9 09:56:05 UTC 2011
Hi Marcel,
On Mon, Feb 07, 2011 at 10:43:54AM -0800, Marcel Moolenaar wrote:
> All,
>
> I've been reviewing the use of the cpu_l2cache_* functions and found
> that 1) they're missing from cpu_witch() and 2) they are always used
> in conjunction with either cpu_idcache_* or cpu_dcache_*.
>
> Since most CPU variants define them as null ops, isn't it better to
> incorporate the functionality of cpu_l2cache_* in cpu_idcache_* and
> cpu_dcache_* and eliminate them altogether?
>
> Any objections to me removing cpu_l2cache_* and therefore changing
> the semantics of cpu_idcache_* and cpu_dcahce_* to apply to all
> relevant cache levels?
>
I chose to make the l2cache functions separate from the [i]dcache functions
because there's a number of cases where L1 cache flush was needed, but not L2,
and that would be a performance penalty to do both.
Also, more CPU variants define them as null ops now, but most new arm cpus
come with a L2 cache,, so we need to think about it carefully.
Regards,
Olivier
More information about the freebsd-arm
mailing list