1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* 3 * Copyright 2022-2023 Rivos, Inc 4 */ 5 6 #ifndef _ASM_CPUFEATURE_H 7 #define _ASM_CPUFEATURE_H 8 9 #include <linux/bitmap.h> 10 #include <asm/hwcap.h> 11 12 /* 13 * These are probed via a device_initcall(), via either the SBI or directly 14 * from the corresponding CSRs. 15 */ 16 struct riscv_cpuinfo { 17 unsigned long mvendorid; 18 unsigned long marchid; 19 unsigned long mimpid; 20 }; 21 22 struct riscv_isainfo { 23 DECLARE_BITMAP(isa, RISCV_ISA_EXT_MAX); 24 }; 25 26 DECLARE_PER_CPU(struct riscv_cpuinfo, riscv_cpuinfo); 27 28 DECLARE_PER_CPU(long, misaligned_access_speed); 29 30 /* Per-cpu ISA extensions. */ 31 extern struct riscv_isainfo hart_isa[NR_CPUS]; 32 33 #endif 34