Re: [PATCH] Thermal: intel: hfi: Give HFI instances package scope

From: Ricardo Neri
Date: Mon Jul 08 2024 - 22:13:08 EST


On Wed, Jul 03, 2024 at 01:33:03PM +0200, Rafael J. Wysocki wrote:
> On Wed, Jul 3, 2024 at 7:55 AM Zhang Rui <rui.zhang@xxxxxxxxx> wrote:
> >
> > The Intel Software Developer's Manual defines the scope of HFI (registers
> > and memory buffer) as package. Use package scope* in the software
>
> "as a package"
>
> > representation of an HFI instance.
> >
> > Using die scope in HFI instances has the effect of creating multiple,
> > conflicting, instances for the same package: each instance allocates its
> > own memory buffer and configures the same package-level registers.
> > Specifically, only one of the allocated memory buffers can be set in the
> > MSR_IA32_HW_FEEDBACK_PTR register. CPUs get incorrect HFI data from the
> > table.
> >
> > The problem does not affect current HFI-capable platforms because they
> > all have single-die processors.
> >
> > * We used die scope for HFI instances because there have been processors
> > in which packages where enumerated as dies. None of those systems support
>
> "were"
>
> > HFI. If such a system emerged we would need to quirk it.
> >
> > Co-developed-by: Chen Yu <yu.c.chen@xxxxxxxxx>
> > Signed-off-by: Chen Yu <yu.c.chen@xxxxxxxxx>
> > Signed-off-by: Zhang Rui <rui.zhang@xxxxxxxxx>
>
> Ricardo, any concerns?

No concerns. IMO, it is important to document why we were using die scope
before. Rui has done it.

This patch looks good to me.

FWIW, Reviewed-by: Ricardo Neri <ricardo.neri-calderon@xxxxxxxxxxxxxxx>