Skip to content

Commit

Permalink
unix: update riscv_hwprobe constants
Browse files Browse the repository at this point in the history
Linux 6.5 enhanced the riscv_hwprobe syscall to detect four new
RISC-V extensions, V, Zba, Zbb and Zbs.  Update the hwprobe
constants in unix so these extensions can be detected by Go
programs.

Updates golang/go#61416

Change-Id: Id6b4566c5c96fe3429fad54e93d3459cb5317642
Reviewed-on: https://go-review.googlesource.com/c/sys/+/530895
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
  • Loading branch information
markdryan authored and gopherbot committed Sep 26, 2023
1 parent 71c9d87 commit 8858c72
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions unix/linux/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,10 @@ struct my_can_bittiming_const {
#define RISCV_HWPROBE_KEY_IMA_EXT_0 4
#define RISCV_HWPROBE_IMA_FD (1 << 0)
#define RISCV_HWPROBE_IMA_C (1 << 1)
#define RISCV_HWPROBE_IMA_V (1 << 2)
#define RISCV_HWPROBE_EXT_ZBA (1 << 3)
#define RISCV_HWPROBE_EXT_ZBB (1 << 4)
#define RISCV_HWPROBE_EXT_ZBS (1 << 5)
#define RISCV_HWPROBE_KEY_CPUPERF_0 5
#define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0)
#define RISCV_HWPROBE_MISALIGNED_EMULATED (1 << 0)
Expand Down Expand Up @@ -5793,6 +5797,10 @@ const (
RISCV_HWPROBE_KEY_IMA_EXT_0 = C.RISCV_HWPROBE_KEY_IMA_EXT_0
RISCV_HWPROBE_IMA_FD = C.RISCV_HWPROBE_IMA_FD
RISCV_HWPROBE_IMA_C = C.RISCV_HWPROBE_IMA_C
RISCV_HWPROBE_IMA_V = C.RISCV_HWPROBE_IMA_V
RISCV_HWPROBE_EXT_ZBA = C.RISCV_HWPROBE_EXT_ZBA
RISCV_HWPROBE_EXT_ZBB = C.RISCV_HWPROBE_EXT_ZBB
RISCV_HWPROBE_EXT_ZBS = C.RISCV_HWPROBE_EXT_ZBS
RISCV_HWPROBE_KEY_CPUPERF_0 = C.RISCV_HWPROBE_KEY_CPUPERF_0
RISCV_HWPROBE_MISALIGNED_UNKNOWN = C.RISCV_HWPROBE_MISALIGNED_UNKNOWN
RISCV_HWPROBE_MISALIGNED_EMULATED = C.RISCV_HWPROBE_MISALIGNED_EMULATED
Expand Down
4 changes: 4 additions & 0 deletions unix/ztypes_linux_riscv64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8858c72

Please sign in to comment.