]> www.infradead.org Git - users/dwmw2/linux.git/commit
riscv: Move cpufeature.h macros into their own header
authorAlexandre Ghiti <alexghiti@rivosinc.com>
Sun, 3 Nov 2024 14:51:41 +0000 (15:51 +0100)
committerPalmer Dabbelt <palmer@rivosinc.com>
Mon, 11 Nov 2024 15:33:08 +0000 (07:33 -0800)
commit010e12aa4925b36700ebacb763a7e6cfd771d9a2
tree3d82e8bd09408f6a245414c18805ecb4e4a495eb
parent81983758430957d9a5cb3333fe324fd70cf63e7e
riscv: Move cpufeature.h macros into their own header

asm/cmpxchg.h will soon need riscv_has_extension_unlikely() macros and
then needs to include asm/cpufeature.h which introduces a lot of header
circular dependencies.

So move the riscv_has_extension_XXX() macros into their own header which
prevents such circular dependencies by including a restricted number of
headers.

Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Andrea Parri <parri.andrea@gmail.com>
Link: https://lore.kernel.org/r/20241103145153.105097-2-alexghiti@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/cpufeature-macros.h [new file with mode: 0644]
arch/riscv/include/asm/cpufeature.h