summaryrefslogtreecommitdiffstats
path: root/arch/riscv/kernel/cpufeature.c
diff options
context:
space:
mode:
authorJisheng Zhang <jszhang@kernel.org>2022-05-22 23:35:43 +0800
committerPalmer Dabbelt <palmer@rivosinc.com>2022-06-16 10:51:31 -0700
commit5d0fbbbe1d8742bfef7a1123f5c9577396765aa3 (patch)
treef501c76a53e813b709c8c733a83e1af6b21f49ce /arch/riscv/kernel/cpufeature.c
parentc360cbec351103f4539b2bf68e42c35d252849ab (diff)
downloadlinux-5d0fbbbe1d8742bfef7a1123f5c9577396765aa3.tar.bz2
riscv: switch has_fpu() to the unified static key mechanism
This is to use the unified static key mechanism instead of putting static key related here and there. Signed-off-by: Jisheng Zhang <jszhang@kernel.org> Reviewed-by: Atish Patra <atishp@rivosinc.com> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20220522153543.2656-3-jszhang@kernel.org Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv/kernel/cpufeature.c')
-rw-r--r--arch/riscv/kernel/cpufeature.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c
index 62843a3d3083..4fbfa1be077e 100644
--- a/arch/riscv/kernel/cpufeature.c
+++ b/arch/riscv/kernel/cpufeature.c
@@ -27,9 +27,6 @@ unsigned long elf_hwcap __read_mostly;
/* Host ISA bitmap */
static DECLARE_BITMAP(riscv_isa, RISCV_ISA_EXT_MAX) __read_mostly;
-#ifdef CONFIG_FPU
-__ro_after_init DEFINE_STATIC_KEY_FALSE(cpu_hwcap_fpu);
-#endif
__ro_after_init DEFINE_STATIC_KEY_ARRAY_FALSE(riscv_isa_ext_keys, RISCV_ISA_EXT_KEY_MAX);
EXPORT_SYMBOL(riscv_isa_ext_keys);
@@ -245,10 +242,6 @@ void __init riscv_fill_hwcap(void)
if (j >= 0)
static_branch_enable(&riscv_isa_ext_keys[j]);
}
-#ifdef CONFIG_FPU
- if (elf_hwcap & (COMPAT_HWCAP_ISA_F | COMPAT_HWCAP_ISA_D))
- static_branch_enable(&cpu_hwcap_fpu);
-#endif
}
#ifdef CONFIG_RISCV_ALTERNATIVE