Hi, On Wed, Aug 27, 2025 at 06:11:43PM +0100, James Morse wrote: > Hi Dave, > > On 27/08/2025 11:46, Dave Martin wrote: > > Hi, > > > > On Fri, Aug 22, 2025 at 03:29:43PM +0000, James Morse wrote: > >> MPAM needs to know the size of a cache associated with a particular CPU. > >> The DT/ACPI agnostic way of doing this is to ask cacheinfo. > >> > >> Add a helper to do this. > > >> diff --git a/include/linux/cacheinfo.h b/include/linux/cacheinfo.h [...] > >> +static inline unsigned int get_cpu_cacheinfo_size(int cpu, int level) > >> +{ > >> + struct cacheinfo *ci = get_cpu_cacheinfo_level(cpu, level); > >> + > >> + return ci ? ci->size : 0; > >> +} > >> + > > > > Orphaned function? > > > > Can fs/resctrl/rdtgroup.c:rdtgroup_cbm_to_size() be ported to use this? > > If so, this wouldn't just be dead code in this series. > > Ah - I thought the MPAM driver was pulling this value in, but its the resctrl glue code. > I was trying to reduce the number of trees this touches - its probably best to kick this > into the next series that adds the resctrl code as its pretty trivial. > > > Thanks, > > James > Fair enough. Cheers ---Dave