File tree Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Original file line number Diff line number Diff line change 8
8
9
9
#include <linux/jump_label.h>
10
10
#include <linux/sched/task_stack.h>
11
+ #include <asm/hwcap.h>
11
12
#include <asm/processor.h>
12
13
#include <asm/ptrace.h>
13
14
#include <asm/csr.h>
@@ -56,10 +57,9 @@ static inline void __switch_to_aux(struct task_struct *prev,
56
57
fstate_restore (next , task_pt_regs (next ));
57
58
}
58
59
59
- extern struct static_key_false cpu_hwcap_fpu ;
60
60
static __always_inline bool has_fpu (void )
61
61
{
62
- return static_branch_likely (& cpu_hwcap_fpu );
62
+ return static_branch_likely (& riscv_isa_ext_keys [ RISCV_ISA_EXT_KEY_FPU ] );
63
63
}
64
64
#else
65
65
static __always_inline bool has_fpu (void ) { return false; }
Original file line number Diff line number Diff line change @@ -27,9 +27,6 @@ unsigned long elf_hwcap __read_mostly;
27
27
/* Host ISA bitmap */
28
28
static DECLARE_BITMAP (riscv_isa , RISCV_ISA_EXT_MAX ) __read_mostly ;
29
29
30
- #ifdef CONFIG_FPU
31
- __ro_after_init DEFINE_STATIC_KEY_FALSE (cpu_hwcap_fpu );
32
- #endif
33
30
__ro_after_init DEFINE_STATIC_KEY_ARRAY_FALSE (riscv_isa_ext_keys , RISCV_ISA_EXT_KEY_MAX );
34
31
EXPORT_SYMBOL (riscv_isa_ext_keys );
35
32
@@ -245,10 +242,6 @@ void __init riscv_fill_hwcap(void)
245
242
if (j >= 0 )
246
243
static_branch_enable (& riscv_isa_ext_keys [j ]);
247
244
}
248
- #ifdef CONFIG_FPU
249
- if (elf_hwcap & (COMPAT_HWCAP_ISA_F | COMPAT_HWCAP_ISA_D ))
250
- static_branch_enable (& cpu_hwcap_fpu );
251
- #endif
252
245
}
253
246
254
247
#ifdef CONFIG_RISCV_ALTERNATIVE
You can’t perform that action at this time.
0 commit comments