]> www.infradead.org Git - users/jedix/linux-maple.git/commit
thermal: intel: hfi: Give HFI instances package scope
authorZhang Rui <rui.zhang@intel.com>
Wed, 3 Jul 2024 05:54:45 +0000 (13:54 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 9 Jul 2024 16:29:07 +0000 (18:29 +0200)
commitb755367602d70deade956cbe0b8a3f5a12f569dc
tree1e2c29f780bff8ac0d8f7055b12e2493a658966e
parent55397323f3eaba16b93182c35be85aa35cad1432
thermal: intel: hfi: Give HFI instances package scope

The Intel Software Developer's Manual defines the scope of HFI (registers
and memory buffer) as a package. Use package scope(*) in the software
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 had been
    processors with packages enumerated as dies. None of those systems
    supported HFI, though. If such a system emerged, it would need to
    be quirked.

Co-developed-by: Chen Yu <yu.c.chen@intel.com>
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Link: https://patch.msgid.link/20240703055445.125362-1-rui.zhang@intel.com
[ rjw: Changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/intel/intel_hfi.c