RISC-V: Improve use of isa2hwcap[]
authorAndrew Jones <ajones@ventanamicro.com>
Tue, 29 Nov 2022 14:34:45 +0000 (15:34 +0100)
committerPalmer Dabbelt <palmer@rivosinc.com>
Sat, 10 Dec 2022 03:09:08 +0000 (19:09 -0800)
commit726855549cf8d5c6b05795cf74a9c23584f45544
treee8a335a67703ac7f147be83b30d3337c6ba1bbde
parent5c20a3a9df19811051441214e7f5091cb3546db0
RISC-V: Improve use of isa2hwcap[]

Improve isa2hwcap[] by removing it from static storage, as
riscv_fill_hwcap() is only called once, and by reducing its size
from 256 bytes to 26. The latter improvement is possible because
isa2hwcap[] will never be indexed with capital letters and we can
precompute the offsets from 'a'.

No functional change intended.

Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20221129143447.49714-2-ajones@ventanamicro.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/kernel/cpufeature.c