mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-23 07:23:12 +02:00
powercap: RAPL: fix invalid initialization for pl4_supported field
commitd05b5e0baf
upstream. The current initialization of the struct x86_cpu_id via pl4_support_ids[] is partial and wrong. It is initializing "stepping" field with "X86_FEATURE_ANY" instead of "feature" field. Use X86_MATCH_INTEL_FAM6_MODEL macro instead of initializing each field of the struct x86_cpu_id for pl4_supported list of CPUs. This X86_MATCH_INTEL_FAM6_MODEL macro internally uses another macro X86_MATCH_VENDOR_FAM_MODEL_FEATURE for X86 based CPU matching with appropriate initialized values. Reported-by: Dave Hansen <dave.hansen@intel.com> Link: https://lore.kernel.org/lkml/28ead36b-2d9e-1a36-6f4e-04684e420260@intel.com Fixes:eb52bc2ae5
("powercap: RAPL: Add Power Limit4 support for Meteor Lake SoC") Fixes:b08b95cf30
("powercap: RAPL: Add Power Limit4 support for Alder Lake-N and Raptor Lake-P") Fixes:5157559069
("powercap: RAPL: Add Power Limit4 support for RaptorLake") Fixes:1cc5b9a411
("powercap: Add Power Limit4 support for Alder Lake SoC") Fixes:8365a898fe
("powercap: Add Power Limit4 support") Signed-off-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> [ Ricardo: I only kept TIGERLAKE, ALDERLAKE, and ALDERLAKE_L in pl4_support_ids as only these models are enumerated before this changeset. ] Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9a4be35d9c
commit
3088bb7aad
|
@ -136,9 +136,9 @@ static int rapl_msr_write_raw(int cpu, struct reg_action *ra)
|
|||
|
||||
/* List of verified CPUs. */
|
||||
static const struct x86_cpu_id pl4_support_ids[] = {
|
||||
{ X86_VENDOR_INTEL, 6, INTEL_FAM6_TIGERLAKE_L, X86_FEATURE_ANY },
|
||||
{ X86_VENDOR_INTEL, 6, INTEL_FAM6_ALDERLAKE, X86_FEATURE_ANY },
|
||||
{ X86_VENDOR_INTEL, 6, INTEL_FAM6_ALDERLAKE_L, X86_FEATURE_ANY },
|
||||
X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE_L, NULL),
|
||||
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE, NULL),
|
||||
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L, NULL),
|
||||
{}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user