mirror of
https://github.com/golang/sys.git
synced 2026-01-29 07:02:06 +03:00
cpu: set PPC64.IsPOWER8 for Power9 on aix
This is in line with the behavior on linux. Fixes golang/go#46040 Change-Id: I01ba1896d879425d12096ae67250d7e60beb7a99 Reviewed-on: https://go-review.googlesource.com/c/sys/+/318549 Trust: Tobias Klauser <tobias.klauser@gmail.com> Trust: Bryan C. Mills <bcmills@google.com> Trust: Martin Möhrmann <moehrmann@google.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com> Reviewed-by: Martin Möhrmann <moehrmann@google.com>
This commit is contained in:
committed by
Tobias Klauser
parent
977fb72620
commit
b0526f3d87
@@ -154,14 +154,13 @@ var MIPS64X struct {
|
||||
// For ppc64/ppc64le, it is safe to check only for ISA level starting on ISA v3.00,
|
||||
// since there are no optional categories. There are some exceptions that also
|
||||
// require kernel support to work (DARN, SCV), so there are feature bits for
|
||||
// those as well. The minimum processor requirement is POWER8 (ISA 2.07).
|
||||
// The struct is padded to avoid false sharing.
|
||||
// those as well. The struct is padded to avoid false sharing.
|
||||
var PPC64 struct {
|
||||
_ CacheLinePad
|
||||
HasDARN bool // Hardware random number generator (requires kernel enablement)
|
||||
HasSCV bool // Syscall vectored (requires kernel enablement)
|
||||
IsPOWER8 bool // ISA v2.07 (POWER8)
|
||||
IsPOWER9 bool // ISA v3.00 (POWER9)
|
||||
IsPOWER9 bool // ISA v3.00 (POWER9), implies IsPOWER8
|
||||
_ CacheLinePad
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ func archInit() {
|
||||
PPC64.IsPOWER8 = true
|
||||
}
|
||||
if impl&_IMPL_POWER9 != 0 {
|
||||
PPC64.IsPOWER8 = true
|
||||
PPC64.IsPOWER9 = true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user