diff options
author | Dao Lu <daolu@rivosinc.com> | 2022-06-20 22:15:25 +0200 |
---|---|---|
committer | Palmer Dabbelt <palmer@rivosinc.com> | 2022-08-11 17:03:49 +0200 |
commit | 8eb060e10185cfc97ef0200d197ec246ba0f9f8c (patch) | |
tree | 5d72c5ef54b14b6b84b202ceae056cb401cf4284 /arch/riscv/Makefile | |
parent | riscv: implement Zicbom-based CMO instructions + the t-head variant (diff) | |
download | linux-8eb060e10185cfc97ef0200d197ec246ba0f9f8c.tar.xz linux-8eb060e10185cfc97ef0200d197ec246ba0f9f8c.zip |
arch/riscv: add Zihintpause support
Implement support for the ZiHintPause extension.
The PAUSE instruction is a HINT that indicates the current hart’s rate
of instruction retirement should be temporarily reduced or paused.
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Dao Lu <daolu@rivosinc.com>
[Palmer: Some minor merge conflicts.]
Link: https://lore.kernel.org/all/20220620201530.3929352-1-daolu@rivosinc.com/
Link: https://lore.kernel.org/all/20220811053356.17375-1-palmer@rivosinc.com/
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv/Makefile')
-rw-r--r-- | arch/riscv/Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile index 42d7ff8730aa..3fa8ef336822 100644 --- a/arch/riscv/Makefile +++ b/arch/riscv/Makefile @@ -60,6 +60,10 @@ riscv-march-$(toolchain-need-zicsr-zifencei) := $(riscv-march-y)_zicsr_zifencei toolchain-supports-zicbom := $(call cc-option-yn, -march=$(riscv-march-y)_zicbom) riscv-march-$(toolchain-supports-zicbom) := $(riscv-march-y)_zicbom +# Check if the toolchain supports Zihintpause extension +toolchain-supports-zihintpause := $(call cc-option-yn, -march=$(riscv-march-y)_zihintpause) +riscv-march-$(toolchain-supports-zihintpause) := $(riscv-march-y)_zihintpause + KBUILD_CFLAGS += -march=$(subst fd,,$(riscv-march-y)) KBUILD_AFLAGS += -march=$(riscv-march-y) |