Re: [PATCH v2 3/6] platform/x86/intel: TPMI domain id and CPU mapping
From: Tero Kristo
Date: Fri May 31 2024 - 12:48:48 EST
On Fri, 2024-05-31 at 16:45 +0300, Ilpo Järvinen wrote:
> On Tue, 28 May 2024, Tero Kristo wrote:
>
> > From: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx>
> >
> > Each TPMI power domain includes a group of CPUs. Several power
> > management settings in this case applicable to a group of CPUs.
> > There can be several power domains in a CPU package. So, provide
> > interfaces for:
> > - Get power domain id for a Linux CPU
> > - Get mask of Linux CPUs in a power domain
> >
> > Hardware Punit uses different CPU numbering, which is not based on
> > APIC (Advanced Programmable Interrupt Controller) CPU numbering.
> > The Linux CPU numbering is based on APIC CPU numbering. Some PM
> > features
> > like Intel Speed Select, the CPU core mask provided by the hardware
> > is
> > based on the Punit CPU numbering. To use the core mask, this mask
> > needs to be converted to a Linux CPUs mask. So, provide interfaces
> > for:
> > - Convert to a Linux CPU number from a Punit CPU number
> > - Convert to a Punit CPU number from a Linux CPU number
> >
> > On each CPU online, MSR 0x54 is used to read the mapping and stores
> > in
> > a per cpu array. Create a hash for faster searching of a Linux CPU
> > number
> > from a Punit CPU number.
> >
> > Signed-off-by: Srinivas Pandruvada
> > <srinivas.pandruvada@xxxxxxxxxxxxxxx>
> > [tero.kristo: minor updates]
> > Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> > Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
> > Signed-off-by: Tero Kristo <tero.kristo@xxxxxxxxxxxxxxx>
> > ---
> > v2:
> > * changed to use X86_MATCH_VFM() instead of
> > X86_MATCH_INTEL_FAM6_MODEL()
>
> I've applied this v2 + the other patches from v1 series now to
> review-ilpo
> branch.
>
> For the record, I removed "All rights reserved." lines from the
> patches
> while applying. I asking first (privately) a permission from Tero
> whether
> it's okay with him I remove those lines.
>
Thanks Ilpo!
-Tero