git: 5648f730c0cc - stable/13 - x86: ignore stepping for APL30 errata

From: Corvin Köhne <corvink_at_FreeBSD.org>
Date: Thu, 19 Jan 2023 06:42:54 UTC
The branch stable/13 has been updated by corvink:

URL: https://cgit.FreeBSD.org/src/commit/?id=5648f730c0cc4c4836e265087199971bac256d7f

commit 5648f730c0cc4c4836e265087199971bac256d7f
Author:     Corvin Köhne <corvink@FreeBSD.org>
AuthorDate: 2022-08-09 07:07:59 +0000
Commit:     Corvin Köhne <corvink@FreeBSD.org>
CommitDate: 2023-01-19 06:42:41 +0000

    x86: ignore stepping for APL30 errata
    
    The issue is present in all apollolake cpus and it doesn't look like
    there'll be a fix in the future.
    
    See
    https://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/pentium-celeron-n-series-j-series-datasheet-spec-update.pdf
    
    MFC after:              1 week
    Sponsored by:           Beckhoff Automation GmbH & Co. KG
    Differential Revision: https://reviews.freebsd.org/D37621
    
    (cherry picked from commit 122405c9034b624dd6771d578ef2467aa96cc145)
    
    x86: Remove redundant parentheses
    
    Reported by:    avg
    Sponsored by:   Beckhoff Automation GmbH & Co. KG
    MFC after:      1 week
    MFC-With:       b223c1f1a0ac ("x86: Add another cpuid for Apollo Lake errata APL30")
    
    (cherry picked from commit 821b850a3bb73a78eef97ea22d1dc6ea82195b65)
    
    x86: Add another cpuid for Apollo Lake errata APL30
    
    Sponsored by:   Beckhoff Automation GmbH & Co. KG
    MFC after:      1 week
    
    (cherry picked from commit b223c1f1a0ac83a3bd1475add9b794bad1749b2f)
---
 sys/x86/x86/cpu_machdep.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/x86/x86/cpu_machdep.c b/sys/x86/x86/cpu_machdep.c
index 1ec3fb669d01..37db1e85a374 100644
--- a/sys/x86/x86/cpu_machdep.c
+++ b/sys/x86/x86/cpu_machdep.c
@@ -827,7 +827,8 @@ cpu_idle_tun(void *unused __unused)
 		mwait_cpustop_broken = true;
 	}
 
-	if (cpu_vendor_id == CPU_VENDOR_INTEL && cpu_id == 0x506c9) {
+	if (cpu_vendor_id == CPU_VENDOR_INTEL &&
+	    CPUID_TO_FAMILY(cpu_id) == 0x6 && CPUID_TO_MODEL(cpu_id) == 0x5c) {
 		/*
 		 * Apollo Lake errata APL31 (public errata APL30).
 		 * Stores to the armed address range may not trigger