Re: [PATCH v6 1/9] x86/topology: Export topo_lookup_cpuid() for resctrl use

Chen Yu <[email protected]>
Newsgroups org.kernel.vger.linux-kernel
Message-ID <aokilyyvs4tFyTzS@three-body>
Hi Reinette,

On Wed, Aug 19, 2026 at 03:55:36PM -0700, Reinette Chatre wrote:
> Hi Chenyu,
> 
> On 7/25/26 2:22 AM, Chen Yu wrote:
> > Enhanced RDT (ERDT) enumerates its monitoring and control resources
> 
> Please use at least 80 characters per line. The checkpatch warnings about 75
> characters can be ignored. For context, please see
> https://lore.kernel.org/lkml/20250916105447.GCaMlB976WLxHHeNMD@fat_crate.local/
> 
> Please check entire series.
>

Got it, will check and fix them accordingly.
 
> > through ACPI tables that identify each CPU by its x2APIC ID. To
> > associate this firmware-provided data with the kernel's per-CPU
> > structures, ERDT must translate those x2APIC IDs into logical CPU
> > numbers.
> > 
> > topo_lookup_cpuid() already performs this translation, but it is
> > static to topology.c and therefore not reachable from resctrl.
> > 
> > Export topo_lookup_cpuid() and add its declaration to asm/apic.h so
> 
> To support this change you could add a motivation why this particular
> header file was chosen. For example,
> "add its declaration to asm/apic.h" -> "add its declaration to asm/apic.h
> that already exposes the inverse mapping"
>

OK, will adjust it.

> > that ERDT can resolve x2APIC IDs from ACPI tables to logical CPU
> > numbers.
> > 
> > No functional change intended.
> > 
> > Signed-off-by: Chen Yu <[email protected]>
> > Tested-by: Hongyu Ning <[email protected]>
> > ---
> 
> | Reviewed-by: Reinette Chatre <[email protected]>
>

Thanks!

Chenyu
 
> Reinette
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.