]> git.dujemihanovic.xyz Git - linux.git/commit
RISC-V: Ignore V from the riscv,isa DT property on older T-Head CPUs
authorConor Dooley <conor@kernel.org>
Fri, 23 Feb 2024 11:31:31 +0000 (11:31 +0000)
committerPalmer Dabbelt <palmer@rivosinc.com>
Fri, 23 Feb 2024 17:01:16 +0000 (09:01 -0800)
commitd82f32202e0df7bf40d4b67c8a4ff9cea32df4d9
treebbf6cb1334e3595496df24ec5ff06aa148121fb1
parentfc325b1a915f6d0c821bfcea21fb3f1354c4323b
RISC-V: Ignore V from the riscv,isa DT property on older T-Head CPUs

Before attempting to support the pre-ratification version of vector
found on older T-Head CPUs, disallow "v" in riscv,isa on these
platforms. The deprecated property has no clear way to communicate
the specific version of vector that is supported and much of the vendor
provided software puts "v" in the isa string. riscv,isa-extensions
should be used instead. This should not be too much of a burden for
these systems, as the vendor shipped devicetrees and firmware do not
work with a mainline kernel and will require updating.

We can limit this restriction to only ignore v in riscv,isa on CPUs
that report T-Head's vendor ID and a zero marchid. Newer T-Head CPUs
that support the ratified version of vector should report non-zero
marchid, according to Guo Ren [1].

Link: https://lore.kernel.org/linux-riscv/CAJF2gTRy5eK73=d6s7CVy9m9pB8p4rAoMHM3cZFwzg=AuF7TDA@mail.gmail.com/
Fixes: dc6667a4e7e3 ("riscv: Extending cpufeature.c to detect V-extension")
Co-developed-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Acked-by: Guo Ren <guoren@kernel.org>
Link: https://lore.kernel.org/r/20240223-tidings-shabby-607f086cb4d7@spud
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/kernel/cpufeature.c