Skip to content

Commit 3379598

Browse files
sohilmehIngo Molnar
authored andcommitted
x86/acpi/cstate: Improve Intel Family model checks
Update the Intel Family checks to consistently use Family 15 instead of Family 0xF. Also, get rid of one of last usages of x86_model by using the new VFM checks. Update the incorrect comment since the check has changed since the initial commit: ee1ca48 ("ACPI: Disable ARB_DISABLE on platforms where it is not needed") The two changes were: - 3e2ada5 ("ACPI: fix Compaq Evo N800c (Pentium 4m) boot hang regression") removed the P4 - Family 15. - 03a05ed ("ACPI: Use the ARB_DISABLE for the CPU which model id is less than 0x0f.") got rid of CORE_YONAH - Family 6, model E. Signed-off-by: Sohil Mehta <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Acked-by: Dave Hansen <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent eb1ac33 commit 3379598

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

arch/x86/include/asm/intel-family.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@
187187
#define INTEL_XEON_PHI_KNL IFM(6, 0x57) /* Knights Landing */
188188
#define INTEL_XEON_PHI_KNM IFM(6, 0x85) /* Knights Mill */
189189

190+
/* Notational marker denoting the last Family 6 model */
191+
#define INTEL_FAM6_LAST IFM(6, 0xFF)
192+
190193
/* Family 15 - NetBurst */
191194
#define INTEL_P4_WILLAMETTE IFM(15, 0x01) /* Also Xeon Foster */
192195
#define INTEL_P4_PRESCOTT IFM(15, 0x03)

arch/x86/kernel/acpi/cstate.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <linux/sched.h>
1414

1515
#include <acpi/processor.h>
16+
#include <asm/cpu_device_id.h>
1617
#include <asm/cpuid.h>
1718
#include <asm/mwait.h>
1819
#include <asm/special_insns.h>
@@ -48,12 +49,11 @@ void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags,
4849
/*
4950
* On all recent Intel platforms, ARB_DISABLE is a nop.
5051
* So, set bm_control to zero to indicate that ARB_DISABLE
51-
* is not required while entering C3 type state on
52-
* P4, Core and beyond CPUs
52+
* is not required while entering C3 type state.
5353
*/
5454
if (c->x86_vendor == X86_VENDOR_INTEL &&
55-
(c->x86 > 0xf || (c->x86 == 6 && c->x86_model >= 0x0f)))
56-
flags->bm_control = 0;
55+
(c->x86 > 15 || (c->x86_vfm >= INTEL_CORE2_MEROM && c->x86_vfm <= INTEL_FAM6_LAST)))
56+
flags->bm_control = 0;
5757

5858
if (c->x86_vendor == X86_VENDOR_CENTAUR) {
5959
if (c->x86 > 6 || (c->x86 == 6 && c->x86_model == 0x0f &&

0 commit comments

Comments
 (0)