Skip to content

proposal: x/sys: add riscv vector extension detection #62238

Description

@mengzhuo

Since Linux 6.5 will be released with riscv vector support, I proposal adding a vector feature detection for it.
Linux source code: https://github.com/torvalds/linux/blob/v6.5-rc7/arch/riscv/include/uapi/asm/hwcap.h

#define COMPAT_HWCAP_ISA_V	(1 << ('V' - 'A'))

The API change in x/sys is simple by adding:

var RISCV64 struct {
	HasV bool // Vector extension
}

Other Linux architecture had already supported aux reading, nothing changed in *_linux.

FreeBSD has not support riscv as Tier 1 platform, nothing changed in freebsd/riscv64.

p.s. In CL 508676, Mills wants a proposal for riscv64 vector extension detection.

Related #61416

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions