]> www.infradead.org Git - nvme.git/commit
riscv: cpufeature: Extract common elements from extension checking
authorCharlie Jenkins <charlie@rivosinc.com>
Fri, 19 Jul 2024 16:15:21 +0000 (09:15 -0700)
committerPalmer Dabbelt <palmer@rivosinc.com>
Mon, 22 Jul 2024 22:36:57 +0000 (15:36 -0700)
commitd4c8d79f5199055da38f880f782a3e62c599ff5d
tree09bbbd160a31477f36617bb5cb370ad775b12272
parent0f2425411101128a38ad0166268975ca11fbcaeb
riscv: cpufeature: Extract common elements from extension checking

The __riscv_has_extension_likely() and __riscv_has_extension_unlikely()
functions from the vendor_extensions.h can be used to simplify the
standard extension checking code as well. Migrate those functions to
cpufeature.h and reorganize the code in the file to use the functions.

Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Andy Chiu <andy.chiu@sifive.com>
Link: https://lore.kernel.org/r/20240719-support_vendor_extensions-v3-4-0af7587bbec0@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/cpufeature.h
arch/riscv/include/asm/vendor_extensions.h