decode SMT parts for AMD family >= 0x17, not just 0x17.
now zen3 systems are properly identified by cpu topology for the scheduler and cpuctl identify.
This commit is contained in:
parent
9bd176bc31
commit
d626ccb00f
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cpu_topology.c,v 1.19 2020/02/15 07:20:41 skrll Exp $ */
|
||||
/* $NetBSD: cpu_topology.c,v 1.20 2021/10/27 04:15:41 mrg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2009 Mindaugas Rasiukevicius <rmind at NetBSD org>,
|
||||
|
@ -36,7 +36,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: cpu_topology.c,v 1.19 2020/02/15 07:20:41 skrll Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: cpu_topology.c,v 1.20 2021/10/27 04:15:41 mrg Exp $");
|
||||
|
||||
#include "acpica.h"
|
||||
|
||||
|
@ -185,8 +185,8 @@ x86_cpu_topology(struct cpu_info *ci)
|
|||
}
|
||||
}
|
||||
|
||||
/* Family 0x17 supports SMT */
|
||||
if (cpu_vendor == CPUVENDOR_AMD && cpu_family == 0x17) { /* XXX */
|
||||
/* Family 0x17 and above support SMT */
|
||||
if (cpu_vendor == CPUVENDOR_AMD && cpu_family >= 0x17) { /* XXX */
|
||||
x86_cpuid(0x8000001e, descs);
|
||||
const u_int threads = ((descs[1] >> 8) & 0xff) + 1;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: i386.c,v 1.122 2021/10/07 13:04:18 msaitoh Exp $ */
|
||||
/* $NetBSD: i386.c,v 1.123 2021/10/27 04:15:42 mrg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
|
||||
|
@ -57,7 +57,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: i386.c,v 1.122 2021/10/07 13:04:18 msaitoh Exp $");
|
||||
__RCSID("$NetBSD: i386.c,v 1.123 2021/10/27 04:15:42 mrg Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -1892,7 +1892,7 @@ identifycpu_cpuids_amd(struct cpu_info *ci)
|
|||
}
|
||||
#endif
|
||||
|
||||
if (cpu_family == 0x17) {
|
||||
if (cpu_family >= 0x17) {
|
||||
x86_cpuid(0x8000001e, descs);
|
||||
const u_int threads = ((descs[1] >> 8) & 0xff) + 1;
|
||||
smt_bits = ilog2(threads);
|
||||
|
|
Loading…
Reference in New Issue